/* public/guidelines.css - StandardCommand Guidelines & SOPs Knowledge Desk */

.gl-shell {
  display: flex;
  height: calc(100vh - 100px);
  min-height: 650px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(38, 48, 68, 0.05);
}

/* Sidebar Navigation */
.gl-sidebar {
  width: 320px;
  min-width: 280px;
  max-width: 360px;
  background: #f8fafc;
  border-right: 1px solid var(--line, #e2e8f0);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.gl-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.gl-search-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  background: #ffffff;
  color: var(--color-text, #1e293b);
  outline: none;
  box-sizing: border-box;
}

.gl-search-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.gl-nav-tree {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.gl-category {
  margin-bottom: 16px;
}

.gl-category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gl-category-count {
  font-size: 10px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 999px;
}

.gl-item-btn {
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-size: 13px;
  color: #334155;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.4;
}

.gl-item-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.gl-item-btn.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.gl-item-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* Main Content Area */
.gl-main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.gl-doc-header {
  border-bottom: 1px solid var(--line, #e2e8f0);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.gl-breadcrumbs {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: normal;
}

.gl-breadcrumbs span {
  white-space: nowrap;
}

.gl-doc-title {
  font-family: "Georgia", serif;
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.gl-doc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gl-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.gl-tag.verified {
  background: #dcfce7;
  color: #166534;
}

.gl-tag.sop {
  background: #e0e7ff;
  color: #3730a3;
}

.gl-tag.checklist {
  background: #fef3c7;
  color: #92400e;
}

.gl-action-bar {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.gl-btn-copy {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line, #cbd5e1);
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.gl-btn-copy:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Document Content Body */
.gl-doc-body {
  line-height: 1.65;
  color: #334155;
  font-size: 14px;
  max-width: 900px;
}

.gl-doc-body h2 {
  font-family: "Georgia", serif;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin: 28px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.gl-doc-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 20px 0 8px 0;
}

.gl-doc-body p {
  margin: 0 0 14px 0;
}

.gl-doc-body ul, .gl-doc-body ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.gl-doc-body li {
  margin-bottom: 6px;
}

/* Alert Boxes */
.gl-alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.gl-alert.important {
  background: #eff6ff;
  border-left: 4px solid #0066cc;
  color: #1e3a8a;
}

.gl-alert.warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.gl-alert.tip {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  color: #166534;
}

.gl-alert-title {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

/* Data Tables inside Docs */
.gl-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.gl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gl-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.gl-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.gl-table tr:last-child td {
  border-bottom: none;
}

.gl-code-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  color: #0f172a;
  overflow-x: auto;
  margin: 14px 0 18px 0;
  white-space: pre-wrap;
}

/* Checklist Items */
.gl-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fafbfc;
  margin-bottom: 6px;
  border: 1px solid #f1f5f9;
}

.gl-check-icon {
  color: #16a34a;
  font-weight: 700;
  margin-top: 1px;
}

/* Responsive layout for tablets & mobile */
@media (max-width: 900px) {
  .gl-shell {
    flex-direction: column;
    height: auto;
    min-height: unset;
  }
  .gl-sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--line, #e2e8f0);
  }
  .gl-main {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .gl-doc-title {
    font-size: 20px;
  }
  .gl-table-container {
    overflow-x: auto;
  }
}
