#cdocs-toggle {
  position: fixed;
  top: 12px; right: 12px;
  z-index: 9999;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  background: #fff;
  color: #111;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: background 0.15s, border-color 0.15s;
}
#cdocs-toggle:hover { background: #f3f4f6; border-color: #9ca3af; }
#cdocs-toggle:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }

.cdocs-modal { display: contents; }
.cdocs-modal[hidden] { display: none; }

.cdocs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.45);
}

.cdocs-panel {
  position: fixed;
  top: 50%; left: 50%;
  z-index: 10001;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

.cdocs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.cdocs-header h2 { margin: 0; font-size: 15px; font-weight: 600; color: #111; }

.cdocs-close {
  background: none; border: none;
  font-size: 20px; line-height: 1;
  color: #6b7280; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
}
.cdocs-close:hover { background: #f3f4f6; color: #111; }
.cdocs-close:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }

.cdocs-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px; line-height: 1.6; color: #374151;
}
.cdocs-body section { margin-bottom: 20px; }
.cdocs-body section:last-child { margin-bottom: 0; }
.cdocs-body h3 {
  margin: 0 0 8px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280;
}
.cdocs-body p { margin: 0 0 6px; }
.cdocs-body ul, .cdocs-body ol { margin: 0; padding-left: 18px; }
.cdocs-body li { margin-bottom: 4px; }
.cdocs-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cdocs-body th, .cdocs-body td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #e5e7eb; }
.cdocs-body th { font-weight: 600; color: #111; background: #f9fafb; }
