:root {
  --docs-bg: #f2f8f4;
  --docs-surface: #ffffff;
  --docs-border: #d2e7da;
  --docs-text: #173027;
  --docs-muted: #547065;
  --docs-accent: #198754;
  --docs-accent-soft: #e8f6ef;
}

body {
  background: radial-gradient(circle at 10% 10%, #e6f7ed 0%, #f2f8f4 45%, #f8fcfa 100%);
  color: var(--docs-text);
}

.docs-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
}

.docs-hero {
  border: 1px solid var(--docs-border);
  background: linear-gradient(130deg, #0f5132 0%, #198754 45%, #4fbf84 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(14, 52, 110, 0.22);
}

.docs-hero-kicker {
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.03em;
}

.docs-hero h1 {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
}

.docs-hero-subtitle {
  color: rgba(255, 255, 255, 0.96);
  max-width: 980px;
}

.docs-card {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(30, 50, 80, 0.08);
}

.docs-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--docs-border);
}

.docs-card-body {
  padding: 1rem 1.25rem;
}

.docs-section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1f5b42;
  text-transform: uppercase;
}

.docs-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.docs-category-item {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--docs-border);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.docs-category-item--admin {
  cursor: grab;
}

.docs-category-item--admin:active {
  cursor: grabbing;
}

.docs-category-item:hover {
  transform: translateY(-2px);
  border-color: #b7d9c4;
  box-shadow: 0 14px 28px rgba(15, 70, 44, 0.10);
}

.docs-category-item .drag-handle,
.docs-subcat-item .drag-handle {
  cursor: grab;
  color: #4d7b67;
  position: relative;
  z-index: 3;
}

.docs-category-link {
  color: inherit;
  text-decoration: none;
}

.docs-category-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0.9rem;
}

.docs-category-title,
.docs-category-desc {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.docs-category-item--admin .docs-category-title,
.docs-category-item--admin .docs-category-desc {
  pointer-events: auto;
}

.docs-category-item--admin .btn,
.docs-category-item--admin .drag-handle {
  position: relative;
  z-index: 4;
}

.docs-doc-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 1rem;
}

.docs-doc-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.docs-nav-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.docs-nav-sidebar--admin {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.docs-nav-sidebar--admin .docs-subcat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.2rem;
}

.docs-content-panel {
  min-width: 0;
}

.docs-search-empty {
  padding: 0.8rem;
  border: 1px dashed var(--docs-border);
  border-radius: 0.75rem;
  color: var(--docs-muted);
  text-align: center;
}

.docs-search-wrap {
  position: relative;
}

.docs-search-input-wrap {
  position: relative;
}

.docs-search-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #2f6b4e;
  z-index: 2;
}

.docs-search-input {
  padding-left: 2.8rem;
  border-radius: 0.9rem;
  border: 1px solid #b8d8c4;
  box-shadow: 0 10px 20px rgba(16, 77, 49, 0.12);
}

.docs-search-input:focus {
  border-color: #6fbe95;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.16), 0 12px 26px rgba(16, 77, 49, 0.14);
}

.docs-search-suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--docs-border);
  border-radius: 0.9rem;
  box-shadow: 0 16px 36px rgba(18, 45, 31, 0.14);
  max-height: 420px;
  overflow: auto;
  padding: 0.5rem;
}

.docs-search-suggestions .SearchBox_Header {
  position: sticky;
  top: -0.5rem;
  background: #fff;
  z-index: 2;
  font-size: 0.88rem;
  color: #4e6d5f;
  padding: 0.35rem 0.4rem 0.55rem;
}

.docs-search-suggestions .SearchBox_Body_link {
  display: block;
  text-decoration: none;
  color: #183426;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.35rem;
}

.docs-search-suggestions .SearchBox_Body_link:hover {
  background: #eef8f2;
  border-color: #cce6d6;
}

.docs-subcat-list,
.docs-subcat-child-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-subcat-item {
  border: 1px solid #cfe3d7;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
}

.docs-subcat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  gap: 0.75rem;
}

.docs-subcat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #204634;
  text-decoration: none;
  min-width: 0;
  border-radius: 0.55rem;
  padding: 0.2rem 0.3rem;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.docs-subcat-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-subcat-link.active {
  background: #dff4e8;
  color: #0f5132;
  box-shadow: inset 0 0 0 1px #9fd0b5;
}

.docs-subcat-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.docs-subcat-actions .btn {
  padding: 0.2rem 0.45rem;
  line-height: 1.1;
}

.docs-subcat-child-list {
  padding: 0 0.75rem 0.65rem 1rem;
  margin-left: 0.45rem;
  border-left: 2px solid #d8eadd;
}

.docs-subcat-child-list .docs-subcat-item {
  margin-top: 0.5rem;
  margin-bottom: 0;
  border-style: dashed;
  background: #fbfefc;
}

.docs-subcat-head--child .docs-subcat-link {
  color: #355e4d;
  font-size: 0.95rem;
}

.docs-subcat-item--inactive {
  border-color: #e9c5c5;
  background: linear-gradient(180deg, #fffafa 0%, #f7f1f1 100%);
  opacity: 0.72;
}

.docs-subcat-item--inactive .docs-subcat-link {
  color: #7a5858;
}

.docs-doc-article {
  margin-bottom: 1rem;
}

.docs-doc-article--inactive {
  border-color: #e9c5c5;
  background: linear-gradient(180deg, #fffdfd 0%, #f7f3f3 100%);
}

.docs-doc-title--inactive {
  color: #9b5f5f;
}

.docs-sidebar-footer {
  border-top: 1px solid var(--docs-border);
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}

.docs-nav-sidebar--admin .docs-sidebar-footer {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--docs-surface);
  z-index: 5;
  padding-bottom: 0.25rem;
}

.callout-block {
  border: 1px solid transparent;
  border-left-width: 5px;
  border-radius: 0.65rem;
  padding: 0.9rem 0.9rem 0px 1rem;
  margin: 1rem 0;
}

.callout-block-info { background: #edf5ff; border-color: #9dc6ff; }
.callout-block-warning { background: #fff7e7; border-color: #ffd27d; }
.callout-block-success { background: #ecfdf3; border-color: #9ae6b4; }
.callout-block-danger { background: #fff1f1; border-color: #ff9f9f; }

.docs-fm-thumb-link {
  display: block;
  margin-bottom: 0.55rem;
}

.docs-fm-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid #d3e5da;
  box-shadow: 0 6px 16px rgba(15, 70, 44, 0.10);
}

@media (max-width: 992px) {
  .docs-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-doc-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .docs-category-grid {
    grid-template-columns: 1fr;
  }
}
