:root {
    --bg: #050514;
    --card-bg: rgba(14, 14, 42, 0.7);
    --border: rgba(124, 58, 237, 0.25);
    --border-hover: rgba(167, 139, 250, 0.45);
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-sub: #64748b;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    background-color: var(--bg);
    background-image: 
      radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.12) 0%, transparent 40%),
      radial-gradient(circle at 85% 65%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
      linear-gradient(180deg, #050514 0%, #0a0628 50%, #050514 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
  a:hover { color: #c4b5fd; }
  
  /* Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 5, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -0.02em;
  }
  .brand img {
    height: 36px;
    width: auto;
    border-radius: 8px;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
  }
  .btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
  }
  .btn-outline:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: var(--border-hover);
    transform: translateY(-1px);
  }
  .btn-primary {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
  }
  .btn-primary:hover {
    box-shadow: 0 0 28px rgba(124, 58, 237, 0.55);
    transform: translateY(-1px);
  }

  /* Subheader / Tabs */
  .page-hero {
    max-width: 1200px;
    margin: 2.5rem auto 1.5rem;
    padding: 0 1.5rem;
  }
  .badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
  }
  .page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
  }
  .page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .doc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }
  .tab-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
  }
  .tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }
  .tab-btn.active {
    color: #fff;
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
  }

  /* Main Container */
  .doc-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  @media (max-width: 900px) {
    .doc-container { grid-template-columns: 1fr; }
    .doc-toc { display: none; }
  }

  /* TOC Sidebar */
  .doc-toc {
    position: sticky;
    top: 6rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
  .toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
  }
  .toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.825rem;
  }
  .toc-list a {
    color: var(--text-muted);
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s;
    line-height: 1.4;
  }
  .toc-list a:hover {
    color: #fff;
    background: rgba(124, 58, 237, 0.15);
  }

  /* Content Card */
  .doc-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
  @media (max-width: 640px) {
    .doc-content { padding: 1.5rem; border-radius: 1rem; }
  }
  .doc-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 6.5rem;
  }
  .doc-section:last-child {
    margin-bottom: 0;
  }
  .section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
  }
  .section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.2em;
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    border-radius: 3px;
  }
  .doc-content p {
    color: #cbd5e1;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.75;
  }
  .doc-list {
    margin: 0.5rem 0 1.25rem 1.5rem;
    color: #cbd5e1;
    font-size: 0.95rem;
  }
  .doc-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
  }
  .requisites-card {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  .req-row {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
  }
  .req-row:last-child { border-bottom: none; }
  .req-label {
    width: 220px;
    font-weight: 600;
    color: var(--accent-light);
  }
  .req-val {
    flex: 1;
    min-width: 200px;
    color: #fff;
  }

  /* Footer */
  .site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: rgba(5, 5, 20, 0.9);
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
  }
  .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .footer-links {
    display: flex;
    gap: 1.5rem;
  }

  /* Print */
  @media print {
    body { background: #fff !important; color: #000 !important; }
    .site-header, .doc-toc, .site-footer, .doc-tabs, .btn { display: none !important; }
    .doc-container { display: block !important; padding: 0 !important; margin: 0 !important; }
    .doc-content { border: none !important; box-shadow: none !important; padding: 0 !important; }
    .section-title { color: #000 !important; border-bottom: 1px solid #ccc !important; }
    .section-title::before { background: #666 !important; }
    p, li, .req-val { color: #333 !important; }
  }
