/*
 * CatalogoCode — Documentation CSS
 * Inspired by BotFast.co/docs dark theme
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Variables */
:root {
  --docs-bg: #0d1117;
  --docs-sidebar-bg: #161b22;
  --docs-border: #30363d;
  --docs-text: #c9d1d9;
  --docs-text-muted: #8b949e;
  --docs-heading: #e6edf3;
  --docs-link: #58a6ff;
  --docs-link-hover: #79c0ff;
  --docs-brand: #075E54;
  --docs-accent: #25D366;
  --docs-ai: #7C3AED;
  --docs-ai-bg: rgba(124,58,237,.15);
  --docs-tip-bg: rgba(35,134,54,.1);
  --docs-tip-border: rgba(46,160,67,.4);
  --docs-tip-text: #3fb950;
  --docs-note-bg: rgba(56,139,253,.1);
  --docs-note-border: rgba(56,139,253,.4);
  --docs-note-text: #58a6ff;
  --docs-warn-bg: rgba(210,153,34,.1);
  --docs-warn-border: rgba(210,153,34,.4);
  --docs-warn-text: #d29922;
  --docs-caut-bg: rgba(248,81,73,.1);
  --docs-caut-border: rgba(248,81,73,.4);
  --docs-caut-text: #f85149;
  --docs-sidebar-w: 260px;
  --docs-header-h: 60px;
}

/* Base */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--docs-header-h) + 24px); }
body.docs-body {
  margin: 0; padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--docs-bg); color: var(--docs-text);
  line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased;
}
.docs *, .docs *::before, .docs *::after { box-sizing: border-box; }
.docs a { color: var(--docs-link); text-decoration: none; transition: color .15s; }
.docs a:hover { color: var(--docs-link-hover); text-decoration: underline; }
.docs img { max-width: 100%; display: block; }
.docs p { margin: 0 0 1rem; }
.docs ul, .docs ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.docs li { margin-bottom: .4rem; }
.docs strong { color: var(--docs-heading); }
.docs h1,.docs h2,.docs h3,.docs h4 {
  color: var(--docs-heading); font-weight: 700; line-height: 1.25; margin: 2rem 0 1rem;
}
.docs h1 { font-size: clamp(1.8rem,3vw,2.5rem); margin-top: 0; }
.docs h2 { font-size: clamp(1.4rem,2.5vw,1.9rem); border-bottom: 1px solid var(--docs-border); padding-bottom: .5rem; }
.docs h3 { font-size: 1.3rem; }
.docs h4 { font-size: 1.1rem; }

/* Layout */
.docs { display: flex; min-height: 100vh; }

/* Mobile header */
.docs__header {
  display: none; position: fixed; top: 0; left: 0; right: 0;
  height: var(--docs-header-h); background: var(--docs-bg);
  border-bottom: 1px solid var(--docs-border);
  padding: 0 20px; align-items: center; justify-content: space-between; z-index: 100;
}
.docs__header-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.1rem; color: #fff; text-decoration: none !important;
}
.docs__header-logo .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--docs-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.docs__burger { background: none; border: none; color: var(--docs-text); cursor: pointer; padding: 8px; display: flex; align-items: center; }

/* Sidebar */
.docs__sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--docs-sidebar-w); background: var(--docs-sidebar-bg);
  border-right: 1px solid var(--docs-border);
  overflow-y: auto; padding: 24px 16px; z-index: 40;
  scrollbar-width: thin; scrollbar-color: var(--docs-border) transparent;
}
.docs__sidebar::-webkit-scrollbar { width: 4px; }
.docs__sidebar::-webkit-scrollbar-thumb { background: var(--docs-border); border-radius: 4px; }
.docs__sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; color: #fff;
  text-decoration: none !important; margin-bottom: 24px;
}
.docs__sidebar-logo .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--docs-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800;
}

/* Search */
.docs__search { position: relative; margin-bottom: 24px; }
.docs__search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--docs-text-muted); pointer-events: none; }
.docs__search input {
  width: 100%; background: var(--docs-bg); border: 1px solid var(--docs-border);
  border-radius: 6px; padding: 8px 12px 8px 34px;
  color: var(--docs-text); font: inherit; font-size: .875rem; transition: border-color .15s;
}
.docs__search input::placeholder { color: var(--docs-text-muted); }
.docs__search input:focus { outline: none; border-color: var(--docs-brand); }

/* Nav */
.docs__nav { display: flex; flex-direction: column; gap: 20px; }
.docs__nav-section { display: flex; flex-direction: column; gap: 2px; }
.docs__nav-group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--docs-text-muted); margin-bottom: 6px; padding-left: 8px; }
.docs__nav-link { display: block; padding: 6px 10px; color: var(--docs-text); font-size: .875rem; border-radius: 6px; text-decoration: none !important; transition: background .15s, color .15s; }
.docs__nav-link:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.docs__nav-link.is-active { background: rgba(7,94,84,.2); color: var(--docs-accent); font-weight: 600; }

/* Main */
.docs__main { flex: 1; margin-left: var(--docs-sidebar-w); padding: 48px 40px 80px; display: flex; justify-content: center; }
.docs__content { width: 100%; max-width: 800px; }
.docs__section { margin-bottom: 64px; }

/* Badge */
.docs__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px;
}
.docs__badge--green { background: rgba(7,94,84,.2); color: var(--docs-accent); }
.docs__badge--ai { background: var(--docs-ai-bg); color: #a78bfa; }
.docs__badge--gray { background: rgba(255,255,255,.08); color: var(--docs-text-muted); }

/* Screenshots */
.docs__img-wrap { margin: 28px 0; }
.docs__img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--docs-border); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.docs__img-cap { margin-top: 10px; font-size: .8rem; color: var(--docs-text-muted); font-style: italic; text-align: center; }

/* Alerts */
.docs__alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 6px; border-left: 4px solid; margin: 24px 0; }
.docs__alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.docs__alert-body { flex: 1; }
.docs__alert-title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.docs__alert p { margin: 0; font-size: .9rem; }
.docs__alert--tip { background: var(--docs-tip-bg); border-color: var(--docs-tip-border); }
.docs__alert--tip .docs__alert-title, .docs__alert--tip svg { color: var(--docs-tip-text); }
.docs__alert--note { background: var(--docs-note-bg); border-color: var(--docs-note-border); }
.docs__alert--note .docs__alert-title, .docs__alert--note svg { color: var(--docs-note-text); }
.docs__alert--warning { background: var(--docs-warn-bg); border-color: var(--docs-warn-border); }
.docs__alert--warning .docs__alert-title, .docs__alert--warning svg { color: var(--docs-warn-text); }
.docs__alert--caution { background: var(--docs-caut-bg); border-color: var(--docs-caut-border); }
.docs__alert--caution .docs__alert-title, .docs__alert--caution svg { color: var(--docs-caut-text); }

/* Code */
.docs code { background: rgba(110,118,129,.3); padding: .15em .4em; border-radius: 4px; font-family: ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size: 85%; }
.docs pre { background: #010409; border: 1px solid var(--docs-border); border-radius: 8px; padding: 16px; overflow-x: auto; margin: 20px 0; }
.docs pre code { background: none; padding: 0; font-size: .875rem; }

/* Steps */
.docs__steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: step; }
.docs__step { position: relative; padding-left: 52px; margin-bottom: 28px; counter-increment: step; }
.docs__step::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--docs-brand); color: #fff;
  font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.docs__step-title { font-weight: 700; color: var(--docs-heading); margin-bottom: 6px; }
.docs__step p { margin: 0; }

/* Two-col */
.docs__two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.docs__col { background: rgba(255,255,255,.03); border: 1px solid var(--docs-border); border-radius: 8px; padding: 16px; }
.docs__col-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.docs__col-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.docs__col--admin .docs__col-label .dot { background: var(--docs-accent); }
.docs__col--client .docs__col-label .dot { background: #a78bfa; }
.docs__col--admin .docs__col-label { color: var(--docs-accent); }
.docs__col--client .docs__col-label { color: #a78bfa; }
.docs__col ul { margin: 0; padding-left: 1.2rem; }
.docs__col li { font-size: .9rem; margin-bottom: .3rem; }

/* Mobile nav */
.docs__mobile-nav { display: none; position: fixed; top: var(--docs-header-h); left: 0; right: 0; bottom: 0; background: var(--docs-bg); z-index: 90; overflow-y: auto; padding: 24px 20px; }
.docs__mobile-nav.is-open { display: block; }

/* Tables */
.docs table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9rem; }
.docs th, .docs td { padding: 10px 14px; border: 1px solid var(--docs-border); text-align: left; }
.docs th { background: rgba(255,255,255,.05); color: var(--docs-heading); font-weight: 600; }
.docs tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* Progress bar */
.docs__progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--docs-accent); z-index: 200; transition: width .1s; width: 0; }

/* Responsive */
@media (max-width: 900px) { .docs__two-col { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .docs__header { display: flex; }
  .docs__sidebar { display: none; }
  .docs__main { margin-left: 0; padding: calc(var(--docs-header-h) + 24px) 20px 60px; }
  .docs h2 { font-size: 1.3rem; }
}