 :root {
    --bg:        #23133a;
    --bg2:       #883cf050;
    --bg3:       #23133a;
    --panel:     #2a1647;
    --border:    #3a1c63;
    --border2:   #5e309d;
    --accent:    #883CF0;
    --accent2:   #883CF0;
    --gold:      #e2eaf5;
    --green:     #e2eaf5;
    --red:       #e2eaf5;
    --purple:    #8b5cf6;
    --pink:      #ec4899;
    --text:      #e2eaf5;
    --muted:     #d6d6d6;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  .delinea-audit-training-guide {
    background: #191127;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    display: flex;
  }

  /* ── GRID NOISE BACKGROUND ── */
  .delinea-audit-training-guide::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(14,165,233,.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(14,165,233,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none; z-index: 0;
  }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #873cf015; }
::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }

  /* ── SIDEBAR NAV ── */
  #sidebar {
    position: sticky; top: 0; left: 0;
    width: 260px; height: 100vh;
    background: #180f26;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 1; overflow-y: auto;
    transition: transform .3s ease;
  }

  .sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-logo .logo-tag {
    font-size: 9px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .sidebar-logo h1 {
    
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
  }
  .sidebar-logo .version-badge {
    display: inline-block;
    margin-top: 8px;
    background: #23133a;
    border: 1px solid #3a1c63;
    color: var(--accent);
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 3px;
  }

  .nav-section { padding: 12px 0; }
  .nav-section-title {
    padding: 4px 20px 8px;
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
  }
  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    transition: all .15s;
    border-left: 2px solid transparent;
    text-decoration: none;
  }
  .nav-item:hover { color: var(--text); background: #23133a9f; }
  .nav-item.active {
    color: var(--accent2);
    border-left-color: var(--accent);
    background: #23133a;
  }
  .nav-item .nav-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background .15s;
  }
  .nav-item.active .nav-dot,
  .nav-item:hover .nav-dot { background: var(--accent); }

  .sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    
    font-size: 10px;
    color: var(--muted);
  }
  .progress-bar-wrap {
    margin-top: 10px;
    background: #282035;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
  }
  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a1c63, #684895);
    border-radius: 2px;
    transition: width .4s ease;
    width: 0%;
  }

  /* ── MAIN CONTENT ── */
  #main {
    /* margin-left: 260px; */
    position: relative;
    height: 100vh;
    overflow-y: auto;
    flex: 1;
  }

  /* ── HERO ── */
  #hero {
    padding: 60px 60px 40px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }
  #hero::after {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, #23133a 0%, transparent 70%);
    pointer-events: none;
  }
  .hero-eyebrow {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
  }
  .hero-eyebrow::before {
    content: '';
    display: block; width: 30px; height: 1px;
    background: var(--accent);
  }
  #hero h1 {
    
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #fff;
  }
  #hero h1 span { color: var(--accent); }
  #hero p {
    font-size: 15px;
    color: var(--muted);
    max-width: 600px;
    margin-bottom: 28px;
  }

  .stat-row {
    display: flex; gap: 20px; flex-wrap: wrap;
  }
  .stat-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    min-width: 130px;
  }
  .stat-card .stat-num {
    
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
  }
  .stat-card .stat-label {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    text-transform: uppercase;
  }

  /* ── SECTIONS ── */
  .content-section {
    padding: 48px 60px;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .content-section.visible {
    opacity: 1; transform: none;
  }

  .section-header {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 28px;
  }
  .section-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid;
  }
  .icon-blue  { background: #23133a;  border-color: #3a1c63; }
  .icon-gold  { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.3); }
  .icon-green { background: rgba(16,185,129,.1);  border-color: rgba(16,185,129,.3); }
  .icon-red   { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.3); }
  .icon-purple{ background: rgba(139,92,246,.1);  border-color: rgba(139,92,246,.3); }
  .icon-pink  { background: rgba(236,72,153,.1);  border-color: rgba(236,72,153,.3); }

  .section-header-text h2 {
    
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
  }
  .section-header-text p {
    font-size: 13px;
    color: var(--muted);
  }

  /* ── LOG TYPE CARDS ── */
  .log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }

  .log-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
  }
  .log-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 3px; height: 100%;
    border-radius: 3px 0 0 3px;
  }
  .log-card.blue::before   { background: var(--accent); }
  .log-card.gold::before   { background: var(--gold); }
  .log-card.green::before  { background: var(--green); }
  .log-card.red::before    { background: var(--red); }
  .log-card.purple::before { background: var(--purple); }
  .log-card.pink::before   { background: var(--pink); }

  .log-card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .log-card.expanded { border-color: var(--border2); }

  .log-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 10px;
  }
  .log-card-title {
    
    font-size: 15px;
    font-weight: 700;
    color: #fff;
  }
  .log-card-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .badge-blue   { background: #1f1232;  color: var(--accent2); border: 1px solid #3a1c63; }
  .badge-gold   { background: rgba(245,158,11,.15);  color: var(--gold);    border: 1px solid rgba(245,158,11,.25); }
  .badge-green  { background: rgba(16,185,129,.15);  color: var(--green);   border: 1px solid rgba(16,185,129,.25); }
  .badge-red    { background: rgba(239,68,68,.15);   color: var(--red);     border: 1px solid rgba(239,68,68,.25); }
  .badge-purple { background: rgba(139,92,246,.15);  color: var(--purple);  border: 1px solid rgba(139,92,246,.25); }
  .badge-pink   { background: rgba(236,72,153,.15);  color: var(--pink);    border: 1px solid rgba(236,72,153,.25); }

  .log-card-desc {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .log-card-meta {
    display: flex; gap: 12px; flex-wrap: wrap;
  }
  .meta-chip {
    
    font-size: 10px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 4px;
  }

  .log-card-expanded {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .log-card.expanded .log-card-expanded { display: block; }

  .expand-toggle {
    
    font-size: 10px;
    color: var(--accent);
    margin-top: 10px;
    display: flex; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .expand-toggle::after { content: ' ↓'; }
  .log-card.expanded .expand-toggle::after { content: ' ↑'; }

  /* ── FIELD ROWS ── */
  .field-list {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 10px;
  }
  .field-row {
    display: flex; gap: 10px; align-items: baseline;
    font-size: 12px;
  }
  .field-name {
    
    font-size: 11px;
    color: var(--accent2);
    min-width: 130px;
    flex-shrink: 0;
  }
  .field-desc { color: var(--muted); }

  /* ── ACCORDION ── */
  .accordion { margin-bottom: 12px; }
  .accordion-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
  }
  .accordion-header:hover { background: var(--panel); }
  .accordion-header.open { border-radius: 8px 8px 0 0; border-bottom-color: transparent; }
  .accordion-arrow { transition: transform .2s; color: var(--muted); font-size: 12px; }
  .accordion-header.open .accordion-arrow { transform: rotate(180deg); }
  .accordion-body {
    display: none;
    padding: 16px 18px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
  }
  .accordion-body.open { display: block; }

  /* ── TABLE ── */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin: 16px 0;
  }
  .data-table th {
    background: var(--bg2);
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
  }
  .data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
  }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table tr:hover td { background: #1f1232; }
  .data-table .mono {  font-size: 11px; color: var(--accent2); }

  /* ── COMPLIANCE MATRIX ── */
  .matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
  }
  .matrix-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
  }
  .matrix-card h3 {
    
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
  }
  .matrix-card ul {
    list-style: none;
    display: flex; flex-direction: column; gap: 6px;
  }
  .matrix-card ul li {
    font-size: 12px;
    color: var(--muted);
    display: flex; align-items: flex-start; gap: 7px;
    line-height: 1.4;
  }
  .matrix-card ul li::before {
    content: '→';
    color: var(--green);
    flex-shrink: 0;
    font-size: 11px;
    margin-top: 1px;
  }

  /* ── BEST PRACTICE STEPS ── */
  .step-list { display: flex; flex-direction: column; gap: 14px; }
  .step-item {
    display: flex; gap: 16px; align-items: flex-start;
  }
  .step-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #23133a;
    border: 1px solid #3a1c63;
    display: flex; align-items: center; justify-content: center;
    
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
  }
  .step-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .step-body p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
  }

  /* ── CODE BLOCK ── */
  .code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    
    font-size: 12px;
    color: #a3c4e8;
    overflow-x: auto;
    line-height: 1.7;
    position: relative;
  }
  .code-block .kw { color: var(--purple); }
  .code-block .str { color: var(--green); }
  .code-block .cm  { color: var(--muted); font-style: italic; }
  .code-block .key { color: var(--accent2); }
  .code-copy {
    position: absolute; top: 10px; right: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--muted);
    
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s;
  }
  .code-copy:hover { color: var(--accent); border-color: var(--accent); }

  /* ── ALERT BOX ── */
  .alert-box {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.5;
  }
  .alert-box .alert-icon { font-size: 16px; flex-shrink: 0; }
  .alert-info  { background: #23133a; border: 1px solid #3a1c63; color: #f0f8ff; }
  .alert-warn  { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #fcd34d; }
  .alert-success { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2); color: #6ee7b7; }

  /* ── TABS ── */
  .tab-group { margin-bottom: 0; }
  .tab-bar {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
  }
  .tab-btn {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all .15s;
    background: none;
    border-top: none; border-left: none; border-right: none;
  }
  .tab-btn:hover { color: var(--text); }
  .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .tab-pane { display: none; }
  .tab-pane.active { display: block; }

  /* ── TOOLTIP ── */
  .has-tip { position: relative; cursor: help; }
  .has-tip .tip {
    display: none;
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;
  }
  .has-tip:hover .tip { display: block; }

  /* ── SUMMARY TICKER ── */
  .log-count-bar {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .count-pill {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    transition: all .2s;
    cursor: pointer;
  }
  .count-pill:hover { border-color: var(--border2); }
  .count-pill .pill-dot {
    width: 7px; height: 7px; border-radius: 50%;
  }
  .count-pill .pill-num {
    
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
  }
  .count-pill .pill-label { color: var(--muted); font-size: 11px; }

  /* ── DIVIDER ── */
  .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 24px 0;
  }

  /* ── CHECKLIST ── */
  .checklist { display: flex; flex-direction: column; gap: 8px; }
  .check-item {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px;
    color: var(--text);
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
  }
  .check-item:hover { border-color: var(--border2); }
  .check-item.checked {
    border-color: rgba(16,185,129,.3);
    background: rgba(16,185,129,.05);
  }
  .check-box {
    width: 18px; height: 18px;
    border: 2px solid var(--border2);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    color: var(--green);
    transition: all .15s;
  }
  .check-item.checked .check-box {
    background: rgba(16,185,129,.2);
    border-color: var(--green);
  }
  .check-text { line-height: 1.4; }
  .check-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

  /* ── MOBILE TOGGLE ── */
  #menu-toggle {
    display: none;
    position: sticky; top: 0px; left: 16px;
    z-index: 1;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
  }

  @media (max-width: 900px) {
    .delinea-audit-training-guide{
      flex-direction: column;
    }

    #sidebar { position: absolute; transform: translateX(-100%); }
    #sidebar.open { transform: none; }
    #main { margin-left: 0; }
    .content-section { padding: 32px 20px; }
    #hero { padding: 60px 20px 32px; }
    #menu-toggle { display: block; }
    .log-grid { grid-template-columns: 1fr; }
  }

  /* ── SCROLL INDICATOR ── */
  #scroll-indicator {
    position: sticky; top: 0; left: 260px; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1;
    transition: transform .1s;
  }

  /* ── TAG ── */
  .tag {
    display: inline-block;
    
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    margin: 2px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
  }
  .tag.critical { color: var(--red);    border-color: rgba(239,68,68,.3);   background: rgba(239,68,68,.05); }
  .tag.high     { color: var(--gold);   border-color: rgba(245,158,11,.3);  background: rgba(245,158,11,.05); }
  .tag.medium   { color: var(--accent); border-color: rgba(14,165,233,.3);  background: rgba(14,165,233,.05); }
  .tag.low      { color: var(--green);  border-color: rgba(16,185,129,.3);  background: rgba(16,185,129,.05); }

  .inline-accent { color: var(--accent2); font-weight: 500; }
  .inline-mono   {  font-size: 12px; color: var(--accent2); }