/* Shared card UI for the AI App Studio docs pages */
.ellipse-blob { z-index: -1; }
.docs-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 34px; margin-bottom: 22px; box-shadow: 0 4px 16px rgba(15,23,42,.07); }
.docs-card > h1 { margin-top: 0; }
.docs-card > .lead { border-bottom: none; padding-bottom: 0; margin-bottom: 20px; }
.docs-card .faq-item:last-child, .docs-card .callout:last-child, .docs-card .table-responsive:last-child { margin-bottom: 0; }
:root { --toc-w: 310px; }
.sidebar-left .nav-section-label { display: flex; align-items: center; gap: 8px; padding: 4px 20px 6px; color: #3b4cca; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-left .nav-section-label::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg,#6366f1,#4f46e5); }
.sidebar-left .doc-nav-link { display: block; margin: 0 0 4px 8px; padding: 7px 20px 7px 12px; border-left: 3px solid transparent; border-radius: 10px; font-size: 14px; color: #4a4a68; text-decoration: none; transition: color .15s, background .15s; }
.sidebar-left .doc-nav-link:hover { color: var(--accent); background: var(--accent-light); }
.sidebar-left .doc-nav-link.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-light); font-weight: 600; }
.sidebar-left .doc-nav-link.disabled { color: #bbb; pointer-events: none; }
.sidebar-left .soon-badge { margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: #f4f4f8; color: #aaa; font-size: 10px; font-weight: 600; }
.sidebar-left > a.doc-nav-link:first-child { color: #0f172a; font-weight: 700; }
.sidebar-left > a.doc-nav-link:first-child:hover { color: var(--accent); }
.docs-toc { overflow-y: auto; padding: 24px 16px 24px 8px; }
.docs-toc-card { background: #fff; border: 1px solid #eef0f6; border-radius: 16px; padding: 22px 14px; box-shadow: 0 4px 16px rgba(15,23,42,.07); }
.docs-toc-help { margin-top: 16px; padding: 14px; border-radius: 12px; background: linear-gradient(140deg,#f5f3ff,#eef2ff); border: 1px solid #e4e0fa; }
.docs-toc-help p { margin: 0 0 8px; font-size: 12.5px; color: #1e293b; line-height: 1.55; }
.docs-toc-help a { font-size: 12.5px; font-weight: 600; color: #4f46e5; text-decoration: none; }
.docs-toc-help a:hover { text-decoration: underline; }
.docs-toc .toc-label { padding: 0 10px; margin-bottom: 12px; }
.docs-toc .toc-list li { margin-bottom: 4px; }
.docs-toc .toc-list a { display: flex; gap: 12px; align-items: baseline; padding: 9px 12px; font-size: 14px; font-weight: 500; line-height: 1.45; color: #64748b; border-radius: 10px; border-left: 3px solid transparent; }
.docs-toc .toc-list a:hover { background: #f8fafc; color: #0f172a; }
.docs-toc .toc-num { font-size: 12px; font-weight: 700; color: #a5b4fc; min-width: 16px; }
.docs-toc .toc-list a.toc-active { background: #eef2ff; color: #4f46e5; font-weight: 600; border-left-color: #4f46e5; }
.docs-toc .toc-list a.toc-active .toc-num { color: #4f46e5; }
/* ---- reference-style card content ---- */
.docs-card > ul:not(.docs-checklist), .docs-card > ol { list-style: none; padding-left: 0; margin: 0 0 16px; }
.docs-card > ul:not(.docs-checklist) li, .docs-card > ol li { position: relative; padding-left: 26px; margin-bottom: 9px; }
.docs-card > ul:not(.docs-checklist) li::before { content: ""; position: absolute; left: 6px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: #6366f1; }
.docs-card > ol { counter-reset: docs-step; }
.docs-card > ol li { padding-left: 34px; counter-increment: docs-step; }
.docs-card > ol li::before { content: counter(docs-step); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px; background: #eef2ff; color: #4f46e5; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.docs-card strong { color: #0f172a; font-weight: 600; }
.docs-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.docs-checklist li { display: flex; gap: 12px; align-items: flex-start; background: #fbfcfe; border: 1px solid #eef0f6; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; color: #64748b; line-height: 1.55; }
.docs-checklist b { display: block; color: #0f172a; font-weight: 600; margin-bottom: 2px; }
.docs-tick { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.docs-card .callout { border-radius: 12px; padding: 16px 18px; }
.docs-card .callout.warning { background: #fef3c7; border-left-color: #f59e0b; color: #92400e; }
.docs-card .callout.warning strong { color: #78350f; }
.docs-card .callout.tip { background: #eef2ff; border-left-color: #6366f1; color: #312e81; }
.docs-card .callout.tip strong { color: #312e81; }
.docs-card .callout.success { background: #ecfdf5; border-left-color: #10b981; color: #065f46; }
.docs-card .callout.success strong { color: #064e3b; }
.docs-code { background: #0f172a; border-radius: 12px; margin: 18px 0; overflow: hidden; box-shadow: 0 4px 16px rgba(15,23,42,.07); }
.docs-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; background: #111c33; border-bottom: 1px solid #1e293b; }
.docs-code-head span { font-size: 12px; color: #94a3b8; font-weight: 500; }
.docs-copy { font: inherit; font-size: 12px; font-weight: 600; color: #c7d2fe; background: rgba(99,102,241,.16); border: 1px solid rgba(99,102,241,.35); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.docs-copy:hover { background: rgba(99,102,241,.28); color: #e0e7ff; }
.docs-code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; color: #a5b4fc; }
.docs-card .table-responsive { border-radius: 12px; border: 1px solid #e2e8f0; overflow: auto; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.docs-card .table > thead > tr > th { vertical-align: middle; background: #0f172a; color: #fff; font-size: 13.5px; font-weight: 600; padding: 13px 16px; border-color: rgba(255,255,255,.08); }
.docs-card .table > tbody > tr > td { padding: 13px 16px; font-size: 14.5px; vertical-align: middle; }
.docs-card .table > tbody > tr > td:first-child { color: #0f172a; }
.docs-card .table > thead > tr > th.text-center { width: 22%; white-space: nowrap; }
.docs-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 13px; font-weight: 700; }
.docs-dash { color: #cbd5e1; font-weight: 700; }
.docs-card .faq-item { border-color: #eef0f6; border-radius: 12px; background: #fcfcff; }
.docs-card .faq-item:has(.faq-question[aria-expanded="true"]) { border-color: #d7d2f7; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.docs-card .faq-question { background: transparent; font-size: 15.5px; color: #0f172a; padding: 16px 18px; }
.docs-card .faq-question:hover { background: transparent; color: #4f46e5; }
.docs-card .faq-question svg { width: 24px; height: 24px; padding: 5px; border-radius: 7px; background: #eef2ff; color: #4f46e5; }
.docs-card .faq-answer.open { max-height: 1000px; }
.docs-card, .docs-card p, .docs-card li, .docs-card td { overflow-wrap: anywhere; }
.docs-card .table { min-width: 520px; }
.docs-card .how-flow { align-items: stretch; }
.docs-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.docs-badge { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; margin-top: 2px; background: linear-gradient(140deg,#6366f1,#4f46e5); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 14px rgba(79,70,229,.3); }
.docs-badge.ghost { background: #eef2ff; color: #4f46e5; box-shadow: none; border: 1px solid #ddd9fb; font-size: 17px; }
.docs-head h2, .content .docs-head h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; color: #0f172a; }
.docs-head h2 small { display: block; font-size: 13px; font-weight: 500; color: #64748b; margin-top: 3px; }

/* ---- responsive (must stay last) ---- */
@media (min-width: 1500px) { :root { --toc-w: 340px; } }
@media (max-width: 900px) { .docs-card { padding: 26px 24px; } }
@media (max-width: 720px) {
  .docs-card { padding: 22px 16px; margin-bottom: 16px; border-radius: 14px; }
  .docs-card > h1 { font-size: 21px; }
  .docs-head { gap: 12px; margin-bottom: 14px; }
  .docs-head h2, .content .docs-head h2 { font-size: 19px; }
  .docs-badge { flex-basis: 32px; width: 32px; height: 32px; border-radius: 10px; }
  .docs-card .how-step, .docs-card .how-step:first-child, .docs-card .how-step:last-child { border-radius: 10px; border-left: 1px solid var(--border); margin-bottom: 8px; }
  .docs-checklist li { padding: 12px; }
  .docs-code pre { font-size: 12.5px; padding: 14px; }
  .docs-card .faq-question { font-size: 14.5px; padding: 14px; gap: 10px; }
}
