/* web-styles v5 — modern design */
:root{
    /* Backgrounds - глубокие синие */
    --bg:#080d19;
    --panel:#0d1424;
    --surface:#111827;
    
    /* Text */
    --text:#f0f4f8;
    --muted:#94a3b8;
    
    /* Accent - бирюзово-голубой */
    --accent:#38bdf8;
    --accent-soft:#0ea5e9;
    
    /* Buttons - индиго тона */
    --btn:#6366f1;
    --btn2:#4f46e5;
    --btn-hover:#818cf8;
    
    /* Border */
    --border:#1e293b;
    
    /* Typography */
    --font-sans:'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono:ui-monospace, 'JetBrains Mono', Consolas, monospace;
  }
  *{box-sizing:border-box}
  body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-sans)}
  .container{max-width:1100px;margin:100px auto 48px;padding:0 24px}
  
  /* Unified Typography */
  h1{font-size:2rem;font-weight:700;letter-spacing:-0.02em;margin:0 0 18px 0}
  h2{font-size:1.5rem;font-weight:600;letter-spacing:-0.01em;margin:0 0 18px 0}
  h3{font-size:1.25rem;font-weight:600;margin:0 0 14px 0}
  h4{font-size:1.1rem;font-weight:600;margin:0 0 12px 0}
  .panel{
    background:linear-gradient(145deg, var(--panel), rgba(12,23,51,0.8));
    border:1px solid rgba(56,189,248,0.1);
    border-radius:16px;
    padding:24px;
    box-shadow:0 8px 28px rgba(0,0,0,.35);
    position:relative;
    overflow:hidden;
  }
  .panel::before{
    content:'';
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:1px;
    background:linear-gradient(90deg, transparent, rgba(56,189,248,0.2), transparent);
  }
  .panel h3{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:1.15rem;
    font-weight:600;
    margin-bottom:16px;
    padding-bottom:12px;
    border-bottom:1px solid rgba(56,189,248,0.1);
  }
  .panel h3::before{
    content:'';
    width:4px;
    height:22px;
    background:linear-gradient(180deg, var(--accent), var(--btn));
    border-radius:2px;
    flex-shrink:0;
  }
  .panel h3 i, .panel h3 svg{
    width:20px;
    height:20px;
    color:var(--accent);
  }
  .analytics-container > * + *{
    margin-top:24px;
  }
  .label{font-size:14px;color:var(--muted)}
  
  /* Form inputs */
  input,select,textarea{
    font-family:var(--font-sans);
    padding:14px 16px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--surface);
    color:var(--text);
    outline:none;
    font-size:14px;
    transition:border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  input::placeholder,textarea::placeholder{
    color:var(--muted);
    opacity:0.7;
  }
  input:hover,select:hover,textarea:hover{
    border-color:rgba(56,189,248,0.3);
    background:rgba(17,24,39,0.8);
  }
  input:focus,select:focus,textarea:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(56,189,248,0.15), 0 0 20px rgba(56,189,248,0.1);
    background:rgba(17,24,39,0.9);
  }
  select{
    cursor:pointer;
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 14px center;
    padding-right:40px;
  }

  .monitoring-interval-form input[type="number"]::-webkit-outer-spin-button,
  .monitoring-interval-form input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
  }
  .monitoring-interval-form input[type="number"]{
    -moz-appearance:textfield;
  }
  .monitoring-interval-btn{
    padding:8px 12px;
    font-size:12px;
    border-radius:8px;
  }
  
  /* Buttons - Modern Style */
  button,.btn{
    font-family:var(--font-sans);
    background:linear-gradient(135deg, var(--btn), var(--btn2));
    border:1px solid rgba(255,255,255,0.1);
    color:#fff;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:600;
    font-size:14px;
    box-shadow:0 2px 8px rgba(99,102,241,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
    transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  button:hover,.btn:hover{
    background:linear-gradient(135deg, var(--btn-hover), var(--btn));
    box-shadow:0 4px 16px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform:translateY(-2px);
    border-color:rgba(255,255,255,0.15);
  }
  button:active,.btn:active{
    transform:translateY(0);
    box-shadow:0 1px 4px rgba(99,102,241,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  }
  button:disabled,.btn:disabled{
    opacity:0.5;
    cursor:not-allowed;
    transform:none;
  }
  
  /* Small buttons */
  .btn-small{
    padding:8px 14px;
    border-radius:8px;
    font-size:12px;
    font-weight:600;
  }
  
  /* Ghost buttons */
  .btn-ghost{
    background:rgba(56,189,248,0.08);
    border:1px solid rgba(56,189,248,0.25);
    color:var(--accent);
    box-shadow:none;
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
  }
  .btn-ghost:hover{
    background:rgba(56,189,248,0.15);
    border-color:rgba(56,189,248,0.4);
    box-shadow:0 0 20px rgba(56,189,248,0.15);
    transform:translateY(-2px);
  }
  .btn-ghost:active{
    transform:translateY(0);
    background:rgba(56,189,248,0.12);
  }
  
  /* Danger button */
  .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: rgba(239,68,68,0.3) !important;
    box-shadow: 0 2px 8px rgba(239,68,68,0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  }
  .btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444) !important;
    box-shadow: 0 4px 16px rgba(239,68,68,0.4), inset 0 1px 0 rgba(255,255,255,0.15) !important;
  }
  
  .hint{color:var(--muted);font-size:12px;margin-top:8px}
  .mono{font-family:var(--font-mono)}
  .actions{display:flex;gap:10px;margin:12px 0;flex-wrap:wrap;align-items:center}
  .action-bar{justify-content:space-between;align-items:center}
  .action-group{display:flex;gap:10px;flex-wrap:wrap}
  .code{white-space:pre-wrap;background:var(--surface);border:1px solid var(--border);padding:14px;border-radius:12px;font-family:var(--font-mono)}
  .input-row{display:grid;gap:12px}
  .input-group{display:grid;grid-template-columns:1fr auto;gap:12px}
  #q{font-size:18px;height:64px}
  .log{
    min-height:180px;
    max-height:480px;
    overflow:auto;
    line-height:1.4;
    font-size:13px;
    padding:16px;
  }
  .spinner{display:inline-block;opacity:.9}
  .filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:8px 0}
  .filters input,.filters select{padding:12px 14px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text)}
  .filters button{padding:12px 14px}

  /* Settings page */
  body.settings-page{
    background: var(--bg);
  }
  .settings-hero{display:grid;gap:16px;margin-bottom:18px}
  .settings-hero-card{padding:18px 20px;position:relative;overflow:hidden}
  .settings-hero-card::after{
    content:'';
    position:absolute;
    top:-120px;
    right:-80px;
    width:320px;
    height:320px;
    background:radial-gradient(circle, rgba(56,189,248,0.18), transparent 70%);
    opacity:.7;
    pointer-events:none;
  }
  .settings-hero-title{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:1.65rem;
    margin:0 0 12px 0;
  }
  .settings-hero-title i{width:26px;height:26px;color:var(--accent)}
  .settings-meta{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:10px;
  }
  .settings-meta-item{
    padding:10px 12px;
    border-radius:12px;
    background:rgba(148,163,184,0.06);
    border:1px solid rgba(148,163,184,0.14);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .settings-meta-label{
    display:block;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--muted);
    margin-bottom:6px;
  }
  .settings-meta-value{
    font-size:13px;
    font-weight:600;
    color:var(--text);
    word-break:break-word;
  }
  .settings-container{padding-bottom:84px}
  .settings-toolbar{padding:20px}
  .settings-toolbar-row{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
  .settings-toolbar-subrow{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:10px}
  .settings-search{
    display:flex;
    align-items:center;
    gap:10px;
    background:linear-gradient(135deg, rgba(17,24,39,0.9), rgba(12,18,34,0.95));
    border:1px solid rgba(56,189,248,0.2);
    border-radius:12px;
    padding:10px 12px;
    min-width:320px;
    flex:1;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
    transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .settings-search:focus-within{
    border-color:rgba(56,189,248,0.6);
    box-shadow:0 0 0 3px rgba(56,189,248,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .settings-page input[type="number"]::-webkit-outer-spin-button,
  .settings-page input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
  }
  .settings-page input[type="number"]{
    -moz-appearance:textfield;
    appearance:textfield;
  }
  .settings-search input{
    flex:1;
    border:none;
    background:transparent;
    padding:0;
    color:var(--text);
    outline:none;
    font-size:14px;
  }
  .settings-search svg{width:18px;height:18px;color:var(--muted)}
  .settings-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
  .settings-mode{
    display:inline-flex;
    align-items:center;
    gap:2px;
    padding:2px;
    border-radius:14px;
    background:rgba(148,163,184,0.06);
    border:1px solid rgba(148,163,184,0.18);
  }
  .settings-mode-btn{
    height:36px;
    padding:0 12px;
    border-radius:12px;
    border:1px solid transparent;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    font-weight:600;
    font-size:13px;
    transition:background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    white-space:nowrap;
  }
  .settings-mode-btn:hover{
    background:rgba(56,189,248,0.06);
    color:var(--text);
    border-color:rgba(56,189,248,0.18);
    box-shadow:0 0 18px rgba(56,189,248,0.06);
  }
  .settings-mode-btn.active{
    color:var(--text);
    border-color:rgba(56,189,248,0.26);
    background:rgba(56,189,248,0.04);
  }
  .settings-mode-btn:focus-visible{
    outline:none;
    border-color: rgba(56,189,248,0.45);
    box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
  }

  body[data-settings-mode="basic"] .settings-field[data-flags~="advanced"],
  body[data-settings-mode="basic"] .settings-field[data-flags~="experimental"]{
    display:none !important;
  }

  .settings-tabs-bar{
    position:sticky;
    top:var(--settings-tabs-top, 92px);
    z-index:950;
    margin:10px 0 14px 0;
    padding:6px 8px;
    background: rgba(15, 21, 39, 0.58);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 42, 71, 0.55);
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    overflow:hidden;
  }
  .settings-tabs-bar::before,
  .settings-tabs-bar::after{
    content:'';
    position:absolute;
    top:0;
    bottom:0;
    width:28px;
    pointer-events:none;
    opacity:0;
    transition:opacity .15s ease;
  }
  .settings-tabs-bar::before{
    left:0;
    background:linear-gradient(90deg, rgba(15, 21, 39, 0.92), rgba(15, 21, 39, 0));
  }
  .settings-tabs-bar::after{
    right:0;
    background:linear-gradient(270deg, rgba(15, 21, 39, 0.92), rgba(15, 21, 39, 0));
  }
  .settings-tabs-bar.tabs-fade-left::before{opacity:1}
  .settings-tabs-bar.tabs-fade-right::after{opacity:1}

  .settings-tabs{
    display:flex;
    gap:6px;
    align-items:center;
    flex-wrap:nowrap;
    white-space:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    -ms-overflow-style:none;
    -webkit-overflow-scrolling:touch;
  }
  .settings-tabs::-webkit-scrollbar{display:none}
  .settings-tab{
    flex:0 0 auto;
    height:34px;
    background:transparent;
    border:1px solid transparent;
    color:var(--muted);
    padding:0 12px;
    border-radius:10px;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:500;
    font-size:12.5px;
    white-space:nowrap;
    position:relative;
    box-shadow:none;
    transform:none;
    transition:background .15s ease, color .15s ease, border-color .15s ease;
  }
  .settings-tab svg{width:16px;height:16px;color:var(--muted);opacity:.9}
  .settings-tab:hover{
    background: rgba(148,163,184,0.06);
    color: var(--text);
    border-color: rgba(148,163,184,0.12);
    transform:none;
  }
  .settings-tab:hover svg{color:var(--accent);opacity:1}
  .settings-tab:active{box-shadow:none;transform:none}
  .settings-tab:focus-visible{
    outline:none;
    border-color: rgba(56,189,248,0.40);
    box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
  }
  .settings-tab.active{
    color: var(--text);
    border-color: rgba(56,189,248,0.25);
    background: rgba(56,189,248,0.08);
    box-shadow: 0 6px 18px rgba(56,189,248,0.08);
  }
  .settings-tab.active svg{color:var(--accent);opacity:1}
  .settings-tab.active::after{
    content:'';
    position:absolute;
    left:12px;
    right:12px;
    bottom:5px;
    height:2px;
    border-radius:999px;
    background: rgba(56,189,248,0.9);
    box-shadow:none;
  }

  .icon-btn{
    width:40px;
    height:40px;
    padding:0;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    cursor:pointer;
    user-select:none;
    background:rgba(148,163,184,0.08);
    border:1px solid rgba(148,163,184,0.18);
    color:var(--muted);
    box-shadow:none;
    transform:none;
    transition:background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  }
  .icon-btn svg{width:18px;height:18px}
  .icon-btn:hover{
    background:rgba(148,163,184,0.12);
    border-color:rgba(148,163,184,0.26);
    box-shadow:0 0 18px rgba(148,163,184,0.08);
    transform:translateY(-1px);
  }
  .icon-btn:active{transform:translateY(0);background:rgba(148,163,184,0.10)}
  .icon-btn:disabled{opacity:0.5;cursor:not-allowed;transform:none}
  .icon-btn:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px rgba(56,189,248,0.18), 0 0 22px rgba(56,189,248,0.12);
    border-color:rgba(56,189,248,0.35);
  }
  .icon-btn-ghost{
    background:rgba(56,189,248,0.08);
    border-color:rgba(56,189,248,0.18);
    color:var(--accent);
  }
  .icon-btn-ghost:hover{
    background:rgba(56,189,248,0.14);
    border-color:rgba(56,189,248,0.32);
    box-shadow:0 0 22px rgba(56,189,248,0.12);
  }
  .icon-btn-danger{
    background:rgba(255,68,68,0.08);
    border-color:rgba(255,68,68,0.22);
    color:#ff9b9b;
  }
  .icon-btn-danger:hover{
    background:rgba(255,68,68,0.12);
    border-color:rgba(255,68,68,0.35);
    box-shadow:0 0 22px rgba(255,68,68,0.12);
  }

  details.settings-more{position:relative}
  details.settings-more > summary{list-style:none}
  details.settings-more > summary::-webkit-details-marker{display:none}
  .settings-more-panel{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:360px;
    max-width:calc(100vw - 44px);
    padding:14px;
    border-radius:16px;
    border:1px solid rgba(56,189,248,0.16);
    background:linear-gradient(145deg, var(--panel), rgba(12,23,51,0.96));
    box-shadow:0 22px 52px rgba(0,0,0,.48);
    z-index:9999;
  }
  .settings-more-section{display:grid;gap:10px}
  .settings-more-section + .settings-more-section{
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid rgba(56,189,248,0.12);
  }
  .settings-more-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
  .settings-more-row select{flex:1;min-width:180px}

  .settings-toggles{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
  .settings-switch-small .settings-switch-ui{width:40px;height:24px}
  .settings-switch-small .settings-switch-ui::after{width:18px;height:18px}
  .settings-switch-small input:checked + .settings-switch-ui::after{transform:translateX(16px)}
  .settings-layout{display:grid;grid-template-columns:1.2fr 0.8fr;gap:18px;align-items:start}
  @media (max-width: 980px){
    .settings-layout{grid-template-columns:1fr}
  }
  .settings-group-title{display:inline-flex;align-items:center;gap:10px;font-weight:700}
  .settings-group-title svg{width:18px;height:18px;color:var(--accent)}
  .settings-group-meta{display:flex;align-items:center;gap:10px}

  .settings-section-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    padding-bottom:12px;
    border-bottom:1px solid rgba(56,189,248,0.10);
  }
  .settings-section-title{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:1.15rem;
    font-weight:600;
    line-height:1.2;
    min-width:0;
  }
  .settings-section-title svg{width:18px;height:18px;color:var(--accent);flex-shrink:0}
  .settings-section-meta{display:flex;align-items:center;gap:8px;white-space:nowrap}
  .settings-section-sep{opacity:.65}
  .settings-section-desc{margin-top:10px}

  .settings-grid{
    display:flex;
    flex-direction:column;
    gap:0;
    margin-top:14px;
  }

  .settings-subhead{
    margin-top:14px;
    padding:14px 10px 8px 10px;
    color:rgba(148,163,184,0.95);
    font-weight:650;
    font-size:11px;
    letter-spacing:0.04em;
    text-transform:uppercase;
    border-top:1px solid rgba(56,189,248,0.08);
    background:linear-gradient(90deg, rgba(56,189,248,0.06), transparent 55%);
    border-radius:10px;
  }
  .settings-subhead:first-child{margin-top:0}

  .settings-section{margin:0;border-radius:18px}
  .settings-empty{
    margin-top:14px;
    padding:14px 16px;
    border-radius:14px;
    background:rgba(148,163,184,0.06);
    border:1px dashed rgba(148,163,184,0.22);
    color:var(--muted);
    font-size:13px;
  }

  .settings-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    padding:14px 10px;
    border-top:1px solid rgba(56,189,248,0.08);
    border-left:2px solid transparent;
    transition:background .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  .settings-row:hover{
    background:rgba(56,189,248,0.04);
  }
  .settings-row:focus-within{
    background:rgba(56,189,248,0.08);
    border-left-color:rgba(56,189,248,0.6);
    box-shadow:inset 0 0 0 1px rgba(56,189,248,0.12);
  }
  .settings-row-left{flex:1;min-width:0}
  .settings-row-title{font-weight:600;line-height:1.2}
  .settings-row-help{
    margin-top:6px;
    line-height:1.35;
    display:block;
    overflow:visible;
  }
  .settings-row-right{
    flex:0 0 380px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
  }
  .settings-row-control{flex:1;display:grid;gap:6px}
  .settings-row-control > input,
  .settings-row-control > select,
  .settings-row-control > textarea{width:100%}
  .settings-row-control > label.settings-switch{justify-self:end;width:auto}

  .settings-control-help{
    font-size:12px;
    line-height:1.25;
    color:var(--muted);
  }

  .settings-row-control[data-suffix]{position:relative}
  .settings-row-control[data-suffix]::after{
    content: attr(data-suffix);
    position:absolute;
    right:12px;
    top:11px;
    font-size:12px;
    color:rgba(148,163,184,0.85);
    pointer-events:none;
  }
  .settings-row-control[data-suffix] > input[type="number"]{padding-right:72px}

  .settings-row-error{
    font-size:12px;
    line-height:1.25;
    color:#ff9b9b;
    margin-top:-2px;
  }

  mark.settings-hl{
    background:rgba(56,189,248,0.16);
    color:inherit;
    border:1px solid rgba(56,189,248,0.22);
    border-radius:6px;
    padding:0 2px;
  }

  .settings-invalid{
    background: transparent;
    box-shadow: none;
    border-left-color: rgba(255, 68, 68, 0.65);
  }
  .settings-invalid .settings-row-control > input,
  .settings-invalid .settings-row-control > select,
  .settings-invalid .settings-row-control > textarea{
    border-color: rgba(255, 68, 68, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.08);
  }

  .settings-row-multiline .settings-row-right{align-items:flex-start}
  .settings-row-multiline textarea{min-height:120px}

  @media (max-width: 940px){
    .settings-row{flex-direction:column;align-items:stretch}
    .settings-row-right{flex-basis:auto;width:100%;justify-content:flex-start}
    .settings-row-control{justify-content:flex-start}
  }

  .settings-field-deleted{
    background: transparent;
    box-shadow: none;
    border-left-color: rgba(255, 68, 68, 0.65);
  }
  .settings-field-dirty{
    background: transparent;
    box-shadow: none;
    border-left-color: rgba(56,189,248,0.65);
  }

  .settings-switch-compact{gap:0}
  .settings-switch-compact .settings-switch-text{display:none}

  .settings-field-tools{
    display:flex;
    gap:6px;
    align-items:center;
    flex-shrink:0;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .15s ease, visibility .15s ease;
  }
  .settings-field-tools .icon-btn{
    width:28px;
    height:28px;
    border-radius:10px;
    background:rgba(148,163,184,0.06);
    border:1px solid rgba(148,163,184,0.14);
    color:var(--muted);
  }
  .settings-field-tools .icon-btn svg{width:14px;height:14px}
  .settings-row:hover .settings-field-tools,
  .settings-row:focus-within .settings-field-tools,
  .settings-field-dirty .settings-field-tools,
  .settings-field-deleted .settings-field-tools{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .settings-list{min-height:120px;resize:vertical;font-family:var(--font-mono);white-space:pre}
  .settings-yaml{min-height:260px;resize:vertical;font-family:var(--font-mono);white-space:pre}
  .settings-preview-panel{position:static;top:auto}
  .settings-preview{padding:18px}
  .settings-preview-summary{
    list-style:none;
    cursor:pointer;
    user-select:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:4px 4px 10px 4px;
    border-bottom:1px solid rgba(56,189,248,0.10);
  }
  .settings-preview[data-locked="1"] .settings-preview-summary{
    cursor:default;
    pointer-events:none;
  }
  .settings-preview-summary::-webkit-details-marker{display:none}
  .settings-preview-title{display:flex;align-items:center;gap:10px;font-weight:700}
  .settings-preview-title svg{width:18px;height:18px;color:var(--accent)}
  .settings-preview-chevron{width:18px;height:18px;color:var(--muted);transition:transform .15s ease}
  .settings-preview[data-locked="1"] .settings-preview-chevron{display:none}
  details.settings-preview[open] .settings-preview-chevron{transform:rotate(180deg)}
  .settings-preview-body{margin-top:12px;display:grid;gap:12px}
  .settings-preview .settings-yaml{
    min-height:320px;
    padding:16px 18px;
    border-radius:14px;
    background:linear-gradient(145deg, rgba(15,23,42,0.9), rgba(10,16,30,0.95));
    border:1px solid rgba(56,189,248,0.12);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .settings-preview .actions{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap:10px;
    align-items:stretch;
  }
  .settings-preview .actions .btn{width:100%}
  .settings-advanced .settings-yaml{
    min-height:420px;
    padding:18px 20px;
    font-size:13px;
    line-height:1.5;
    background:linear-gradient(145deg, rgba(14,22,38,0.95), rgba(9,15,28,0.95));
    border:1px solid rgba(56,189,248,0.14);
    border-radius:14px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 22px rgba(0,0,0,0.28);
    width:100%;
    max-width:100%;
    display:block;
  }
  .settings-advanced .settings-yaml:focus{
    border-color:rgba(56,189,248,0.35);
    box-shadow:0 0 0 3px rgba(56,189,248,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    background:linear-gradient(145deg, rgba(17,27,46,0.96), rgba(10,16,30,0.96));
  }
  /* Compact action buttons inside settings */
  .settings-actions .btn,
  .settings-inline-actions .btn,
  .settings-bottom-actions .btn,
  .settings-preview .actions .btn{
    padding:10px 12px;
    font-size:13px;
    border-radius:9px;
  }
  .settings-inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 6px 0 6px}
  .settings-advanced > summary{
    list-style:none;
    cursor:pointer;
    user-select:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    border:1px solid rgba(56,189,248,0.12);
    border-radius:14px;
    background:linear-gradient(145deg, var(--panel), rgba(12,23,51,0.85));
    box-shadow:0 6px 22px rgba(0,0,0,.25);
    margin-top:12px;
  }
  .settings-advanced > summary::-webkit-details-marker{display:none}
  .settings-warning{
    margin-top:12px;
    padding:14px 16px;
    border-radius:14px;
    background:rgba(255,193,7,0.08);
    border:1px solid rgba(255,193,7,0.25);
  }
  .settings-warning-title{display:flex;align-items:center;gap:10px;font-weight:700;color:#ffd166}
  .settings-warning-title svg{width:18px;height:18px;color:#ffd166}

  .settings-switch{display:flex;align-items:center;gap:12px}
  .settings-switch input{position:absolute;opacity:0;width:0;height:0}
  .settings-switch-ui{
    width:44px;
    height:26px;
    border-radius:999px;
    background:rgba(148,163,184,0.18);
    border:1px solid rgba(148,163,184,0.25);
    position:relative;
    transition:background .15s ease, border-color .15s ease;
    flex-shrink:0;
  }
  .settings-switch-ui::after{
    content:'';
    width:20px;
    height:20px;
    position:absolute;
    top:2px;
    left:2px;
    border-radius:50%;
    background:#e5e7eb;
    transition:transform .15s ease, background .15s ease;
    box-shadow:0 2px 6px rgba(0,0,0,.35);
  }
  .settings-switch input:checked + .settings-switch-ui{
    background:rgba(56,189,248,0.22);
    border-color:rgba(56,189,248,0.42);
  }
  .settings-switch input:checked + .settings-switch-ui::after{
    transform:translateX(18px);
    background:var(--accent);
  }
  .settings-switch-text{color:var(--muted);font-size:13px}

  .settings-bottom-bar{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:9998;
    padding:10px 14px;
    background:rgba(8,13,25,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top:1px solid rgba(56,189,248,0.12);
  }
  .settings-bottom-inner{
    max-width:1100px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .settings-bottom-left{display:flex;align-items:center;gap:10px;color:var(--text);font-weight:600}
  .settings-dirty-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:rgba(255,193,7,0.9);
    box-shadow:0 0 0 6px rgba(255,193,7,0.10);
  }
  .settings-bottom-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

  @keyframes settings-fade-up{
    from{opacity:0;transform:translateY(10px)}
    to{opacity:1;transform:translateY(0)}
  }
  .settings-hero,
  .settings-tabs-bar,
  .settings-layout{
    animation:settings-fade-up .35s ease both;
  }
  .settings-tabs-bar{animation-delay:.04s}
  .settings-layout{animation-delay:.08s}
  @media (prefers-reduced-motion: reduce){
    .settings-hero,
    .settings-tabs-bar,
    .settings-layout{animation:none}
  }

  .badge-default{
    background:rgba(148,163,184,0.12) !important;
    color:var(--muted) !important;
    border-color:rgba(148,163,184,0.25) !important;
  }
  .badge-file{
    background:rgba(56,189,248,0.12) !important;
    color:var(--accent) !important;
    border-color:rgba(56,189,248,0.25) !important;
  }
  .badge-dirty{
    background:rgba(255,193,7,.12) !important;
    color:#ffd166 !important;
    border-color:rgba(255,193,7,.30) !important;
  }
  .badge-warn{
    background:rgba(255,193,7,.12) !important;
    color:#ffd166 !important;
    border-color:rgba(255,193,7,.30) !important;
  }
  .badge-delete{
    background:rgba(255,68,68,.12) !important;
    color:#ff9b9b !important;
    border-color:rgba(255,68,68,.30) !important;
  }
  
  /* Status grid */
  .status-grid{
    display:grid;
    grid-template-columns: 2fr 1fr;
    gap:16px;
    margin-bottom:16px;
  }
  .status-steps{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px;
  }
  .steps-header{
    font-weight:700;
    color:var(--muted);
    margin-bottom:8px;
  }
  .steps{
    list-style:none;
    padding:0;
    margin:0;
    display:grid;
    gap:6px;
  }
  .steps li{
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#0b142a;
    color:var(--muted);
    font-size:14px;
    display:flex;
    align-items:center;
    gap:10px;
    transition:border-color .15s ease, background .15s ease, color .15s ease;
  }
  .step-badge{
    width:24px;
    height:24px;
    border-radius:8px;
    background:rgba(56,189,248,.12);
    border:1px solid rgba(56,189,248,.3);
    color:#b8d8f8;
    font-weight:700;
    font-size:13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
  }
  .step-text{line-height:1.35;}
  .steps li.done{
    border-color:rgba(56,189,248,.5);
    background:rgba(56,189,248,.08);
    color:#e5f1ff;
  }
  .steps li.done .step-badge{
    background:linear-gradient(180deg, var(--accent), var(--btn));
    color:var(--bg);
    border-color:rgba(56,189,248,.6);
  }
  .progress{
    margin-top:10px;
    background:#0b142a;
    border:1px solid var(--border);
    border-radius:999px;
    height:12px;
    overflow:hidden;
  }
  .progress-bar{
    height:100%;
    width:0%;
    background:linear-gradient(90deg, var(--accent), var(--btn));
    transition:width .25s ease;
  }
  .status-mini{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px;
    display:grid;
    gap:8px;
  }
  .mini-row{
    display:flex;
    justify-content:space-between;
    font-size:14px;
  }
  .mini-label{
    color:var(--muted);
  }
  
  .status-metrics{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:10px;
    align-items:stretch;
  }
  .metric-badge{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    padding:10px 12px;
    display:flex;
    flex-direction:column;
    gap:4px;
    min-height:64px;
  }
  .metric-label{
    color:var(--muted);
    font-size:12px;
    letter-spacing:.2px;
  }
  .metric-value{
    font-size:18px;
    font-weight:700;
    color:var(--text);
  }
  .metric-hint{
    font-size:10px;
    color:var(--muted);
    opacity:0.7;
    margin-top:-2px;
  }

  /* Status Info Panel - improved cards */
  .status-info-panel{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
    margin-bottom:16px;
  }
  .info-card{
    background:linear-gradient(135deg, rgba(13, 20, 36, 0.9), rgba(17, 24, 39, 0.85));
    border:1px solid rgba(56, 189, 248, 0.12);
    border-radius:14px;
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  .info-card-label{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    font-weight:500;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:0.5px;
  }
  .info-card-label i, .info-card-label svg{
    width:14px;
    height:14px;
    color:var(--accent);
    opacity:0.8;
  }
  .info-card-value{
    font-size:22px;
    font-weight:700;
    color:var(--text);
    line-height:1.2;
  }
  .info-card-value-small{
    font-size:14px;
    font-weight:500;
    word-break:break-word;
  }
  .info-card-type .info-card-value{
    background:linear-gradient(135deg, var(--accent), var(--btn));
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
  }

  /* Status Timeline */
  .status-timeline{
    display:flex;
    gap:24px;
    margin-bottom:16px;
    padding:12px 16px;
    background:rgba(13, 20, 36, 0.5);
    border-radius:10px;
    border:1px solid rgba(56, 189, 248, 0.08);
  }
  .timeline-item{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13px;
    color:var(--muted);
  }
  .timeline-item i, .timeline-item svg{
    width:14px;
    height:14px;
    color:var(--accent);
    opacity:0.7;
  }
  .timeline-label{
    font-weight:500;
  }
  .timeline-value{
    color:var(--text);
    font-weight:600;
    font-family:var(--font-mono);
  }
  @media(max-width:768px){
    .status-info-panel{
      grid-template-columns:1fr;
    }
  }
  
  @media(max-width:960px){
    .status-grid{
      grid-template-columns:1fr;
      gap:12px;
      margin-bottom:12px;
    }
    .input-group{grid-template-columns:1fr;}
    #q{height:auto;min-height:56px;}
    .actions{justify-content:flex-start;}
    .log{max-height:360px;}
    
    /* Responsive navbar */
    .nav{
      top:12px;
      padding:6px 12px;
      border-radius:14px;
      max-width:calc(100vw - 24px);
    }
    .nav:hover{
      padding:8px 16px;
    }
    .nav-container{
      gap:4px;
      flex-wrap:nowrap;
      overflow-x:auto;
      -webkit-overflow-scrolling:touch;
    }
    .nav a{
      padding:6px 10px;
      font-size:13px;
      white-space:nowrap;
    }
    .nav-brand{
      display:none;
    }
    .nav-divider{
      display:none;
    }
    .container{
      margin-top:80px;
    }
  }
  
  /* Toasts */
  .toast-host{
    position:fixed;
    top:24px;
    right:24px;
    z-index:9999;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .toast{
    background:#182235;
    border:1px solid rgba(255,193,7,.35);
    color:#fef3c7;
    padding:12px 14px;
    border-radius:10px;
    min-width:240px;
    box-shadow:0 8px 24px rgba(0,0,0,.35);
    animation:toast-in .2s ease;
  }
  .toast.hide{
    animation:toast-out .35s ease forwards;
  }
  .toast.warn{
    border-color:rgba(255,193,7,.45);
  }
  .toast.ok{
    border-color:rgba(46,204,113,.45);
    color:#dcfce7;
  }
  .toast.err{
    border-color:rgba(255,68,68,.45);
    color:#ffe4e6;
  }
  .toast.info{
    border-color:rgba(56,189,248,.45);
    color:#e0f2fe;
  }
  @keyframes toast-in{
    from{transform:translateY(-8px);opacity:0;}
    to{transform:translateY(0);opacity:1;}
  }
  @keyframes toast-out{
    to{transform:translateY(-8px);opacity:0;}
  }
  
  .report h1 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
  }
  
  .report .subtitle {
    font-size: 16px;
    color: var(--muted);
    margin-top: -6px;
    margin-bottom: 20px;
    font-style: italic;
  }
  
  .report h2 {
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
  }
  
  .report p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 12px;
  }
  
  .report section {
    margin-bottom: 24px;
  }
  
  /* ========== Unified Card Base Styles ========== */
  .report-item,
  .alert-item,
  .record-item,
  .stat-item {
    background: linear-gradient(135deg, rgba(15,21,39,0.95), rgba(12,23,51,0.9));
    border: 1px solid rgba(56,189,248,0.1);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.25s ease;
  }
  
  .report-item::before,
  .record-item::before,
  .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--btn));
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  
  .report-item:hover,
  .alert-item:hover,
  .record-item:hover,
  .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(56,189,248,0.15);
    border-color: rgba(56,189,248,0.25);
  }
  
  .report-item:hover::before,
  .record-item:hover::before,
  .stat-item:hover::before {
    opacity: 1;
  }
  
  .badge {
    background: linear-gradient(135deg, var(--btn), var(--btn2));
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(99,102,241,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99,102,241,0.35);
  }
  
  /* Badge variants */
  .badge-type {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 2px 6px rgba(99,102,241,0.25);
  }
  
  .badge-count {
    background: linear-gradient(135deg, var(--accent), #2e9cd4);
    box-shadow: 0 2px 6px rgba(56,189,248,0.25);
  }
  
  .badge-status{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border:1px solid rgba(255,255,255,.14);
    box-shadow:none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  
  .badge-pending{
    background:rgba(255,193,7,.12);
    color:#ffd166;
    border-color:rgba(255,193,7,.3);
    box-shadow: 0 0 12px rgba(255,193,7,0.15);
  }
  
  .badge-ack{
    background:rgba(46,204,113,.12);
    color:#7ce0a6;
    border-color:rgba(46,204,113,.3);
    box-shadow: 0 0 12px rgba(46,204,113,0.15);
  }
  
  .badge-rejected{
    background:rgba(255,68,68,.12);
    color:#ff9b9b;
    border-color:rgba(255,68,68,.3);
    box-shadow: 0 0 12px rgba(255,68,68,0.15);
  }
  
  .sort-control {
    margin-left: auto;
  }

  .sort-control select {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
    margin-left: 8px;
    min-width: 150px;
  }

  /* Pagination Styles */
  .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(15, 21, 39, 0.6);
    border: 1px solid rgba(30, 42, 71, 0.6);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .pagination-info {
    color: var(--muted);
    font-size: 13px;
  }

  .pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(30, 42, 71, 0.5);
    border: 1px solid rgba(30, 42, 71, 0.8);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
  }

  .pagination-btn:hover:not(.disabled) {
    background: rgba(40, 55, 90, 0.7);
    border-color: var(--accent);
  }

  .pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  .pagination-btn i {
    width: 18px;
    height: 18px;
  }

  .pagination-current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 14px;
  }

  /* Modal Styles */
  .modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal[hidden] {
    display: none;
  }

  .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
  }

  .modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid rgba(30, 42, 71, 0.9);
    border-radius: 16px;
    padding: 24px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.2s ease-out;
  }

  @keyframes modalSlideIn {
    from {
      opacity: 0;
      transform: translateY(-20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text);
  }

  .modal-body {
    margin-bottom: 24px;
  }

  .modal-body p {
    margin: 0 0 8px 0;
    color: var(--muted);
    font-size: 14px;
  }

  .modal-record-title {
    color: var(--text) !important;
    font-weight: 500;
    padding: 12px;
    background: rgba(15, 21, 39, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(30, 42, 71, 0.6);
    word-break: break-word;
  }

  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }

  .modal-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
  }

  .modal-actions .btn-danger:hover {
    background: linear-gradient(135deg, #e74c5a, #d63447);
  }

  .modal-content-wide {
    max-width: 550px;
  }

  .modal-content .add-record-form {
    margin-top: 8px;
  }

  .modal-content .modal-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(30, 42, 71, 0.6);
  }

  /* Enhanced Form Styles */
  .add-record-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form-group-grow {
    flex: 1;
    min-width: 200px;
  }

  .form-group label {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .form-group label .required {
    color: #ff6b6b;
  }

  .form-group label .hint {
    font-size: 11px;
    opacity: 0.7;
  }

  .form-group textarea {
    resize: vertical;
    min-height: 60px;
  }

  .add-record-form button[type="submit"] {
    align-self: flex-start;
  }

  /* Tag Filter Styles */
  .tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  .tag-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(30, 42, 71, 0.5);
    border: 1px solid rgba(30, 42, 71, 0.8);
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .tag-filter-item:hover {
    background: rgba(40, 55, 90, 0.6);
    border-color: var(--accent);
    color: var(--text);
  }

  .tag-filter-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 500;
  }

  .tag-filter-item .tag-count {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
  }

  .tag-filter-item.active .tag-count {
    background: rgba(0, 0, 0, 0.3);
  }

  .filter-active-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
  }

  .filter-active-info strong {
    color: var(--accent);
  }

  .filter-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ff6b6b;
    text-decoration: none;
    font-size: 12px;
    transition: opacity 0.15s;
  }

  .filter-clear:hover {
    opacity: 0.8;
  }

  /* Dropdown Styles */
  .dropdown {
    position: relative;
    display: inline-block;
  }

  .dropdown-toggle {
    cursor: pointer;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 160px;
    padding: 6px 0;
    margin-top: 4px;
    background: var(--card-bg);
    border: 1px solid rgba(30, 42, 71, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.15s ease-out;
  }

  @keyframes dropdownFadeIn {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
  }

  .dropdown-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
  }
  
  .records-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
  }

  .record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  
  .record-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1;
  }

  .record-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    opacity: 0.7;
  }

  .record-date i {
    color: var(--accent);
    opacity: 0.6;
  }
  
  .record-header a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  
  .record-header a:hover {
    color: #7dd8ff;
    text-decoration: underline;
  }
  
  .record-summary {
    color: var(--muted);
    font-size: 14px;
    margin: 8px 0;
  }
  
  .record-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
  }
  
  .tag {
    background: rgba(90, 200, 250, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(90, 200, 250, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }
  
  .tag:hover {
    background: rgba(90, 200, 250, 0.18);
    border-color: rgba(90, 200, 250, 0.35);
    transform: translateY(-1px);
  }
  
  .record-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(56,189,248,0.08);
  }
  
  /* Floating Island Navigation */
  .nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 21, 39, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 42, 71, 0.7);
    border-radius: 16px;
    padding: 8px 20px;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(90, 200, 250, 0.06);
    transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
  }
  
  .nav:hover {
    padding: 10px 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(90, 200, 250, 0.12);
    border-color: rgba(90, 200, 250, 0.25);
  }
  
  .nav-container {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  
  .nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .nav a:hover {
    background: rgba(90, 200, 250, 0.12);
    color: var(--accent);
  }
  
  .nav a.active {
    background: linear-gradient(135deg, var(--btn), var(--btn2));
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 108, 246, 0.3);
  }
  
  .nav a i, .nav a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  
  /* Nav logo/brand */
  .nav-brand {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    white-space: nowrap;
  }
  
  .nav-brand i, .nav-brand svg {
    width: 20px;
    height: 20px;
  }
  
  .nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
  }
  
  /* Стили для мониторинга */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
  }
  
  .stat-item {
    text-align: center;
  }
  
  .stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #7dd8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  /* Вариации для разных типов статистики */
  .stat-item--success .stat-value {
    background: linear-gradient(135deg, #2ecc71, #7ce0a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .stat-item--warning .stat-value {
    background: linear-gradient(135deg, #f1c40f, #ffd166);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .stat-item--danger .stat-value {
    background: linear-gradient(135deg, #e74c3c, #ff9b9b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .alerts-list {
    display: grid;
    gap: 18px;
    margin-top: 24px;
  }
  
  /* Alert-specific ::before - vertical severity line */
  .alert-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  
  .alert-item:hover::before {
    opacity: 1;
  }
  
  .alert-status-line{margin-top:8px;}
  
  /* Alert severity colors with gradients */
  .alert-item.alert-critical::before {
    background: linear-gradient(90deg, #ff4444, #cc0000);
    opacity: 1;
  }
  .alert-item.alert-critical {
    border-color: rgba(255,68,68,0.2);
  }
  
  .alert-item.alert-high::before {
    background: linear-gradient(90deg, #ff8844, #cc5500);
    opacity: 1;
  }
  .alert-item.alert-high {
    border-color: rgba(255,136,68,0.2);
  }
  
  .alert-item.alert-medium::before {
    background: linear-gradient(90deg, #ffaa44, #cc8800);
    opacity: 1;
  }
  .alert-item.alert-medium {
    border-color: rgba(255,170,68,0.2);
  }
  
  .alert-item.alert-low::before {
    background: linear-gradient(90deg, #44ff44, #22aa22);
    opacity: 1;
  }
  .alert-item.alert-low {
    border-color: rgba(68,255,68,0.15);
  }
  
  /* Pulse animation for critical alerts */
  @keyframes alertPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,68,68,0); }
    50% { box-shadow: 0 0 0 4px rgba(255,68,68,0.15); }
  }
  
  .alert-item.alert-critical {
    animation: alertPulse 2s ease-in-out infinite;
  }
  
  .alert-item.alert-critical:hover {
    animation: none;
  }
  
  .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
  }
  
  .alert-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
  }
  
  .alert-severity {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }
  
  /* Severity badge colors */
  .alert-critical .alert-severity {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,68,68,0.3);
  }
  
  .alert-high .alert-severity {
    background: linear-gradient(135deg, #ff8844, #cc5500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,136,68,0.3);
  }
  
  .alert-medium .alert-severity {
    background: linear-gradient(135deg, #ffaa44, #cc8800);
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(255,170,68,0.3);
  }
  
  .alert-low .alert-severity {
    background: linear-gradient(135deg, #44cc44, #22aa22);
    color: #fff;
    box-shadow: 0 2px 8px rgba(68,204,68,0.3);
  }
  
  .alert-message {
    color: var(--text);
    margin: 12px 0;
    line-height: 1.6;
    font-size: 0.95rem;
  }
  
  .alert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(56,189,248,0.08);
    font-size: 12px;
    color: var(--muted);
  }
  .alert-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
  
  .alert-sources {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(56,189,248,0.08);
  }
  
  .alert-sources ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }
  
  .alert-sources li {
    padding: 4px 0;
    font-size: 14px;
  }
  
  .alert-sources a {
    color: var(--accent);
    text-decoration: none;
  }
  
  .alert-sources a:hover {
    text-decoration: underline;
  }
  
  .acknowledged {
    color: var(--muted);
    font-style: italic;
  }
  
  .btn-small {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  .btn-ghost.btn-small{border-radius:10px}
  
  .pill-monitoring{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    border:1px solid var(--border);
    background:rgba(255,255,255,.04);
  }
  .pill-monitoring.state-on{
    background:rgba(46,204,113,.12);
    border-color:rgba(46,204,113,.35);
    color:#7ce0a6;
  }
  .pill-monitoring.state-off{
    background:rgba(255,193,7,.10);
    border-color:rgba(255,193,7,.32);
    color:#ffd166;
  }

  /* AI-CVE monitoring panel */
  .ai-cve-panel{
    background:
      radial-gradient(circle at top right, rgba(56,189,248,0.10), transparent 42%),
      linear-gradient(145deg, var(--panel), rgba(12,23,51,0.84));
  }
  .ai-cve-msg{
    margin:0 0 12px 0;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid rgba(56,189,248,0.24);
    background:rgba(56,189,248,0.08);
    color:#9edfff;
    font-size:13px;
  }
  .ai-cve-severity-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:700;
    letter-spacing:0.35px;
    text-transform:uppercase;
    padding:4px 8px;
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.26);
    background:rgba(148,163,184,0.14);
    color:#d1d5db;
  }
  .ai-cve-severity-critical{
    background:rgba(239,68,68,0.14);
    border-color:rgba(239,68,68,0.34);
    color:#ffb4b4;
  }
  .ai-cve-severity-high{
    background:rgba(245,158,11,0.16);
    border-color:rgba(245,158,11,0.34);
    color:#ffd38f;
  }
  .ai-cve-severity-medium{
    background:rgba(56,189,248,0.16);
    border-color:rgba(56,189,248,0.34);
    color:#9fe5ff;
  }
  .ai-cve-severity-low{
    background:rgba(46,204,113,0.14);
    border-color:rgba(46,204,113,0.34);
    color:#8be6b5;
  }
  .ai-cve-score-chip{
    display:inline-flex;
    align-items:center;
    font-size:11px;
    font-family:var(--font-mono);
    color:#d5deea;
    background:rgba(15,23,42,0.68);
    border:1px solid rgba(148,163,184,0.22);
    border-radius:8px;
    padding:3px 7px;
  }
  .ai-cve-score-chip-kev{
    border-color:rgba(239,68,68,0.34);
    color:#ffb7b7;
    background:rgba(239,68,68,0.12);
  }
  .ai-cve-score-chip-urgent{
    border-color:rgba(239,68,68,0.42);
    color:#ffb7b7;
    background:rgba(239,68,68,0.14);
  }
  .ai-cve-runs{
    margin-top:14px;
  }

  /* AI-CVE work queue */
  .ai-cve-panel{
    padding:20px;
  }
  .ai-cve-stats{
    display:grid;
    grid-template-columns:repeat(3, minmax(120px, 1fr));
    gap:8px;
    margin-bottom:14px;
  }
  .ai-cve-stat{
    display:flex;
    min-width:0;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:11px 12px;
    border:1px solid rgba(148,163,184,0.18);
    border-radius:10px;
    color:var(--text);
    background:rgba(15,23,42,0.52);
    text-decoration:none;
    transition:border-color .15s ease, background .15s ease, transform .15s ease;
  }
  .ai-cve-stat:hover,
  .ai-cve-stat.active{
    border-color:rgba(56,189,248,0.42);
    background:rgba(56,189,248,0.10);
    transform:translateY(-1px);
  }
  .ai-cve-stat--danger strong{
    color:#ff8585;
  }
  .ai-cve-stat--danger.active{
    border-color:rgba(239,68,68,0.44);
    background:rgba(239,68,68,0.12);
  }
  .ai-cve-stat-label{
    min-width:0;
    color:var(--muted);
    font-size:11px;
    line-height:1.25;
  }
  .ai-cve-stat strong{
    flex:0 0 auto;
    font-size:19px;
    color:#83dfff;
  }
  .ai-cve-filter-form{
    display:grid;
    grid-template-columns:minmax(260px, 2fr) minmax(170px, 1fr) auto auto;
    gap:10px;
    align-items:end;
    margin:0 0 12px;
    padding:14px;
    border:1px solid rgba(56,189,248,0.14);
    border-radius:12px;
    background:rgba(8,13,25,0.38);
  }
  .ai-cve-filter-form > label,
  .ai-cve-more-filters-popover label{
    display:grid;
    gap:6px;
    color:var(--muted);
    font-size:11px;
    font-weight:600;
  }
  .ai-cve-filter-form input,
  .ai-cve-filter-form select,
  .ai-cve-more-filters-popover select{
    width:100%;
    min-height:38px;
    padding:8px 10px;
    font-size:12px;
  }
  .ai-cve-filter-actions{
    display:flex;
    justify-content:flex-start;
    gap:8px;
  }
  .ai-cve-filter-actions .btn-small{
    min-height:36px;
    text-decoration:none;
  }
  .ai-cve-more-filters{
    position:relative;
    align-self:end;
  }
  .ai-cve-more-filters summary{
    display:flex;
    min-height:36px;
    align-items:center;
    list-style:none;
    cursor:pointer;
  }
  .ai-cve-more-filters summary::-webkit-details-marker{
    display:none;
  }
  .ai-cve-more-filters-popover{
    position:absolute;
    top:calc(100% + 7px);
    right:0;
    z-index:20;
    width:220px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--panel);
    box-shadow:0 14px 32px rgba(0,0,0,.34);
  }
  .ai-cve-period-filter{
    display:grid;
    gap:5px;
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid rgba(148,163,184,.16);
  }
  .ai-cve-active-filters{
    display:flex;
    min-height:0;
    flex-wrap:wrap;
    gap:7px;
    margin:0 0 12px;
  }
  .ai-cve-active-filters:empty{
    display:none;
  }
  .ai-cve-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    max-width:100%;
    padding:5px 9px;
    overflow:hidden;
    border:1px solid rgba(56,189,248,.28);
    border-radius:999px;
    color:#b8eaff;
    background:rgba(56,189,248,.09);
    font-size:11px;
    text-decoration:none;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ai-cve-filter-chip:hover{
    border-color:rgba(56,189,248,.55);
  }
  .ai-cve-runs summary{
    color:var(--muted);
    font-size:12px;
    font-weight:600;
    cursor:pointer;
  }
  .ai-cve-runs[open] summary{
    margin-bottom:12px;
  }
  .ai-cve-queue{
    overflow:hidden;
    border:1px solid rgba(56,189,248,0.14);
    border-radius:12px;
    background:rgba(8,13,25,0.42);
  }
  .ai-cve-queue-head,
  .ai-cve-finding{
    display:grid;
    grid-template-columns:16% 20% 32% 18%;
    gap:12px;
    align-items:center;
  }
  .ai-cve-queue-head{
    padding:10px 14px;
    border-bottom:1px solid rgba(148,163,184,0.22);
    color:var(--muted);
    background:rgba(15,23,42,0.78);
    font-size:10px;
    font-weight:700;
    letter-spacing:.5px;
    text-transform:uppercase;
  }
  .ai-cve-finding{
    position:relative;
    min-height:78px;
    padding:12px 14px;
    border-bottom:1px solid rgba(30,41,59,0.95);
    cursor:pointer;
    transition:background .15s ease, box-shadow .15s ease;
  }
  .ai-cve-finding:last-child{
    border-bottom:0;
  }
  .ai-cve-finding:hover{
    background:rgba(30,41,59,0.42);
  }
  .ai-cve-finding:focus-visible{
    z-index:1;
    outline:2px solid var(--accent);
    outline-offset:-2px;
    background:rgba(30,41,59,0.52);
  }
  .ai-cve-finding-primary,
  .ai-cve-finding-component,
  .ai-cve-finding-updated{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    min-width:0;
  }
  .ai-cve-finding-id{
    display:inline;
    max-width:100%;
    padding:0;
    border:0;
    border-radius:0;
    color:#9ee2ff;
    background:none;
    box-shadow:none;
    font-family:var(--font-mono);
    font-size:13px;
    font-weight:700;
    line-height:1.35;
    text-align:left;
  }
  .ai-cve-finding:hover .ai-cve-finding-id{
    color:#d2f3ff;
  }
  .ai-cve-relevance-badge{
    display:inline-flex;
    max-width:100%;
    padding:2px 6px;
    border:1px solid rgba(148,163,184,.25);
    border-radius:999px;
    font-size:9px;
    font-weight:700;
    line-height:1.25;
  }
  .ai-cve-relevance-badge--confirmed{
    border-color:rgba(46,204,113,.34);
    color:#8be6b5;
    background:rgba(46,204,113,.1);
  }
  .ai-cve-relevance-badge--potential{
    border-color:rgba(245,158,11,.34);
    color:#ffd38f;
    background:rgba(245,158,11,.1);
  }
  .ai-cve-component{
    display:block;
    max-width:100%;
    overflow:hidden;
    color:var(--muted);
    font-size:11px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ai-cve-component-row,
  .ai-cve-source-badges{
    display:flex;
    min-width:0;
    align-items:center;
    gap:5px;
  }
  .ai-cve-component-row{
    max-width:100%;
  }
  .ai-cve-priority-star{
    flex:0 0 auto;
    color:#f2c96d;
    font-size:12px;
    line-height:1;
  }
  .ai-cve-component-more,
  .ai-cve-source-badge{
    flex:0 0 auto;
    padding:2px 5px;
    border:1px solid rgba(148,163,184,.25);
    border-radius:999px;
    color:var(--muted);
    background:rgba(100,116,139,.1);
    font-size:9px;
    line-height:1.2;
  }
  .ai-cve-version-summary,
  .ai-cve-vulnerability-type{
    color:var(--muted);
    font-size:10px;
    line-height:1.35;
  }
  .ai-cve-version-summary{
    overflow-wrap:anywhere;
  }
  .ai-cve-risk-line{
    display:flex;
    min-width:0;
    flex-wrap:wrap;
    align-items:center;
    gap:5px;
    color:#cbd5e1;
    font-family:var(--font-mono);
    font-size:11px;
  }
  .ai-cve-risk-level{
    font-family:var(--font-sans);
    letter-spacing:.2px;
  }
  .ai-cve-risk-level[class*="ai-cve-severity-"]{
    padding:0;
    border:0;
    background:none;
  }
  .ai-cve-finding-updated time{
    color:var(--text);
    font-size:11px;
  }
  .ai-cve-mobile-label{
    display:none;
  }
  .ai-cve-empty{
    padding:44px 20px;
    text-align:center;
  }
  .ai-cve-empty svg{
    width:34px;
    height:34px;
    color:#5fd39a;
  }
  .ai-cve-empty h3{
    margin:10px 0 4px;
  }
  .ai-cve-empty p{
    margin:0;
    color:var(--muted);
  }
  .ai-cve-pagination{
    margin-top:12px;
    padding:10px 12px;
  }
  .ai-cve-page-size label{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--muted);
    font-size:11px;
  }
  .ai-cve-page-size select{
    width:auto;
    min-height:32px;
    padding:5px 28px 5px 8px;
    font-size:11px;
  }
  .ai-cve-runs{
    margin-top:14px;
    padding:12px 14px;
    border:1px solid rgba(148,163,184,0.16);
    border-radius:10px;
    background:rgba(15,23,42,0.36);
  }
  .ai-cve-run-list{
    display:grid;
    gap:6px;
  }
  .ai-cve-run{
    display:grid;
    grid-template-columns:minmax(150px, 1.5fr) repeat(6, minmax(72px, 1fr));
    gap:8px;
    align-items:center;
    padding:8px 10px;
    border-radius:8px;
    color:var(--muted);
    background:rgba(8,13,25,0.45);
    font-size:11px;
  }
  .ai-cve-run time{
    color:var(--text);
  }
  .ai-cve-run-error{
    color:#ff9f9f;
  }
  body.ai-cve-drawer-open{
    overflow:hidden;
  }
  .ai-cve-drawer-backdrop{
    position:fixed;
    inset:0;
    z-index:1100;
    display:none;
    background:rgba(0,0,0,.42);
    backdrop-filter:blur(2px);
  }
  .ai-cve-drawer-backdrop.open{
    display:block;
  }
  .ai-cve-drawer{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    z-index:1200;
    width:min(680px, 94vw);
    overflow:auto;
    border-left:1px solid var(--border);
    background:var(--bg);
    box-shadow:-18px 0 48px rgba(0,0,0,.42);
    transform:translateX(102%);
    transition:transform .18s ease;
  }
  .ai-cve-drawer.open{
    transform:translateX(0);
  }
  .ai-cve-drawer-header{
    position:sticky;
    top:0;
    z-index:2;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:18px 22px;
    border-bottom:1px solid var(--border);
    background:rgba(8,13,25,.92);
    backdrop-filter:blur(16px);
  }
  .ai-cve-drawer-header h3{
    margin:4px 0 0;
  }
  .ai-cve-drawer-body{
    padding:20px 22px 34px;
  }
  .ai-cve-drawer-body section{
    padding:4px 0 14px;
    border-bottom:1px solid rgba(148,163,184,0.14);
  }
  .ai-cve-drawer-body section:last-child{
    border-bottom:0;
  }
  .ai-cve-drawer-body h4{
    margin:16px 0 9px;
    color:var(--muted);
    font-size:12px;
    letter-spacing:.35px;
    text-transform:uppercase;
  }
  .ai-cve-drawer-body p{
    line-height:1.6;
  }
  .ai-cve-drawer-score,
  .ai-cve-source-row,
  .ai-cve-link-row{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
  }
  .ai-cve-link-row{
    margin-top:10px;
  }
  .ai-cve-link-row .btn-small{
    text-decoration:none;
  }
  .ai-cve-detail-grid{
    display:grid;
    grid-template-columns:140px minmax(0, 1fr);
    gap:8px 14px;
    margin:0;
    font-size:12px;
  }
  .ai-cve-detail-grid dt{
    color:var(--muted);
  }
  .ai-cve-detail-grid dd{
    min-width:0;
    margin:0;
    overflow-wrap:anywhere;
  }
  .ai-cve-drawer-times{
    display:flex;
    flex-wrap:wrap;
    gap:8px 16px;
    padding-top:14px;
    color:var(--muted);
    font-size:10px;
  }
  .ai-cve-drawer-times time{
    margin-left:4px;
    color:var(--text);
  }
  .ai-cve-drawer-error{
    color:#ff9f9f;
  }
  .ai-cve-drawer-loading,
  .ai-cve-drawer-error{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:120px;
    justify-content:center;
  }
  .ai-cve-drawer [hidden]{
    display:none !important;
  }
  .ai-cve-drawer-error{
    flex-direction:column;
  }
  .ai-cve-loading-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 0 0 rgba(56,189,248,.5);
    animation:aiCvePulse 1.2s infinite;
  }
  @keyframes aiCvePulse{
    70%{box-shadow:0 0 0 8px rgba(56,189,248,0);}
    100%{box-shadow:0 0 0 0 rgba(56,189,248,0);}
  }

  @media (max-width: 1180px){
    .ai-cve-stats{
      grid-template-columns:repeat(3, minmax(0, 1fr));
    }
  }

  @media (max-width: 900px){
    .ai-cve-queue-head{
      display:none;
    }
    .ai-cve-finding{
      grid-template-columns:1fr 1fr;
      gap:16px;
      padding:16px;
    }
    .ai-cve-finding-primary,
    .ai-cve-finding-component,
    .ai-cve-finding-updated{
      align-items:flex-start;
    }
    .ai-cve-mobile-label{
      display:block;
      margin-bottom:5px;
      color:var(--muted);
      font-size:9px;
      font-weight:700;
      letter-spacing:.45px;
      text-transform:uppercase;
    }
    .ai-cve-run{
      grid-template-columns:repeat(3, 1fr);
    }
    .ai-cve-run time{
      grid-column:1 / -1;
    }
  }

  @media (max-width: 680px){
    .ai-cve-panel{
      padding:14px;
    }
    .ai-cve-stats{
      grid-template-columns:repeat(3, minmax(0, 1fr));
    }
    .ai-cve-filter-form{
      grid-template-columns:1fr auto;
    }
    .ai-cve-search-field,
    .ai-cve-filter-form > label:not(.ai-cve-search-field){
      grid-column:1 / -1;
    }
    .ai-cve-filter-actions{
      justify-content:flex-start;
      grid-column:2;
    }
    .ai-cve-more-filters{
      grid-column:1;
    }
    .ai-cve-more-filters-popover{
      right:auto;
      left:0;
    }
    .ai-cve-finding{
      grid-template-columns:1fr;
    }
    .ai-cve-desktop-only{
      display:none !important;
    }
    .ai-cve-run{
      grid-template-columns:1fr 1fr;
    }
    .ai-cve-detail-grid{
      grid-template-columns:1fr;
      gap:3px;
    }
    .ai-cve-detail-grid dd{
      margin-bottom:8px;
    }
    .ai-cve-drawer{
      width:100vw;
    }
  }
  
  /* HITL стили */
  .hitl-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
  }
  
  .hitl-option {
    padding: 12px;
    margin: 8px 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  
  .hitl-option:hover {
    background: rgba(90, 200, 250, 0.1);
    border-color: var(--accent);
  }
  
  .hitl-option.selected {
    background: rgba(46, 108, 246, 0.2);
    border-color: var(--btn);
  }
  
  /* Стили для страницы отчётов */
  .reports-list {
    display: grid;
    gap: 20px;
    margin-top: 24px;
  }
  
  .report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 16px;
  }
  
  .report-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
  
  .report-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
  }
  
  .report-header a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  
  .report-header a:hover {
    color: #7dd8ff;
    text-decoration: none;
  }
  
  .report-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(56,189,248,0.08);
  }
  
  .report-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .report-meta a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  
  .report-meta a:hover {
    color: #7dd8ff;
  }
  .report-meta-inline{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    color:var(--muted);
    margin-top:6px;
  }
  
  /* Loading overlay */
  .ti-loading-overlay{
    position:fixed;
    inset:0;
    background:radial-gradient(circle at 20% 20%, rgba(56,189,248,.08), transparent 35%), radial-gradient(circle at 80% 10%, rgba(99,102,241,.12), transparent 30%), rgba(7,10,20,.75);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:12000;
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
    backdrop-filter:blur(4px);
  }
  .ti-loading-overlay.show{
    opacity:1;
    pointer-events:all;
  }
  .ti-loading-card{
    position:relative;
    background:linear-gradient(180deg, rgba(15,21,39,.95), rgba(12,19,35,.96));
    border:1px solid rgba(56,189,248,.35);
    box-shadow:0 16px 44px rgba(0,0,0,.45), 0 0 0 1px rgba(56,189,248,.12);
    border-radius:20px;
    padding:28px 32px;
    text-align:center;
    width:min(460px, 92vw);
    overflow:hidden;
  }
  .ti-loading-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(circle at 30% 30%, rgba(56,189,248,.14), transparent 45%);
    opacity:.25;
    pointer-events:none;
  }
  .ti-loading-logo{
    margin-bottom:10px;
    color:var(--accent);
    display:flex;
    justify-content:center;
  }
  .ti-dog{
    width:140px;
    height:100px;
    filter:drop-shadow(0 6px 18px rgba(0,0,0,.35));
  }
  .ti-dog path{
    stroke-dasharray:240;
    stroke-dashoffset:0;
    animation:tiDogLine 2.4s ease-in-out infinite;
  }
  .ti-dog circle{
    animation:tiDogEye 3s ease-in-out infinite;
  }
  .ti-loading-title{
    font-size:26px;
    letter-spacing:2px;
    font-weight:800;
    margin-bottom:8px;
  }
  .ti-loading-sub{
    color:var(--muted);
    font-size:14px;
    line-height:1.5;
  }
  @keyframes tiDogLine{
    0%,100%{stroke-dashoffset:0;}
    50%{stroke-dashoffset:18;}
  }
  @keyframes tiDogEye{
    0%,88%{transform:translateY(0);}
    92%{transform:translateY(2px);}
    96%{transform:translateY(-1px);}
    100%{transform:translateY(0);}
  }
  
  /* ========== Analytics Dashboard Styles ========== */
  
  .analytics-filters {
    margin-bottom: 20px;
  }
  
  .analytics-filters .filters {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .analytics-period-filter {
    display: grid;
    gap: 16px;
  }

  .analytics-period-filter-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
  }

  .analytics-period-filter-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .analytics-period-hint {
    margin: 0;
  }

  .analytics-period-segments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.36);
  }

  .analytics-period-segment {
    min-width: 94px;
    flex: 1 1 120px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .analytics-period-segment:hover {
    color: var(--text);
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.08);
  }

  .analytics-period-segment.is-active {
    color: var(--text);
    border-color: rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.28));
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.12);
  }

  @media (max-width: 680px) {
    .analytics-period-filter-header {
      align-items: stretch;
      flex-direction: column;
    }
  }

  .analytics-manual-panel {
    display: grid;
    gap: 16px;
  }

  .analytics-manual-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .analytics-manual-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .analytics-manual-hint {
    margin: 6px 0 0;
  }
  
  .analytics-manual-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
  }
  
  .analytics-manual-form input[type="url"],
  .analytics-manual-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0b142a;
    color: var(--text);
    font-size: 15px;
  }

  .analytics-manual-form textarea {
    grid-column: 1 / -1;
    resize: vertical;
  }
  
  .analytics-manual-status {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(56, 189, 248, 0.08);
    color: #dbeafe;
    font-size: 14px;
  }
  
  .analytics-manual-status--loading {
    border-color: rgba(241, 196, 15, 0.24);
    background: rgba(241, 196, 15, 0.08);
    color: #fef3c7;
  }
  
  .analytics-manual-status--success {
    border-color: rgba(46, 204, 113, 0.24);
    background: rgba(46, 204, 113, 0.08);
    color: #dcfce7;
  }
  
  .analytics-manual-status--error {
    border-color: rgba(231, 76, 60, 0.28);
    background: rgba(231, 76, 60, 0.08);
    color: #fecaca;
  }
  
  .analytics-manual-result-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: linear-gradient(135deg, rgba(14, 22, 39, 0.95), rgba(15, 32, 63, 0.88));
  }
  
  .analytics-manual-result-card h4 {
    margin: 0;
    font-size: 20px;
  }
  
  .analytics-manual-result-card h4 a {
    color: var(--text);
    text-decoration: none;
  }
  
  .analytics-manual-result-card h4 a:hover {
    color: var(--accent);
  }
  
  .analytics-manual-result-date {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
  }
  
  .analytics-manual-result-summary {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
  }
  
  .analytics-manual-result-meta,
  .analytics-manual-result-metrics,
  .analytics-manual-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .analytics-manual-pill,
  .analytics-manual-tag,
  .analytics-manual-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    border: 1px solid rgba(56, 189, 248, 0.16);
    background: rgba(56, 189, 248, 0.08);
    color: #dbeafe;
  }
  
  .analytics-manual-tag {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.18);
    color: #e0e7ff;
  }
  
  .analytics-manual-metric {
    background: rgba(46, 204, 113, 0.10);
    border-color: rgba(46, 204, 113, 0.18);
    color: #dcfce7;
  }
  
  .analytics-manual-empty-inline {
    color: var(--muted);
    font-size: 13px;
  }
  
  .analytics-manual-table-wrap {
    overflow: auto;
  }
  
  .analytics-manual-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  
  .analytics-manual-table th,
  .analytics-manual-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: top;
    text-align: left;
    font-size: 14px;
    word-break: break-word;
  }
  
  .analytics-manual-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  
  .analytics-manual-table a {
    color: var(--text);
    text-decoration: none;
  }
  
  .analytics-manual-table a:hover {
    color: var(--accent);
  }
  
  .analytics-manual-empty {
    text-align: center;
    color: var(--muted);
    padding: 18px 12px;
  }
  
  .analytics-overview {
    grid-template-columns: repeat(5, 1fr);
  }
  
  @media (max-width: 1100px) {
    .analytics-overview {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  @media (max-width: 700px) {
    .analytics-overview {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .analytics-overview {
      grid-template-columns: 1fr;
    }
  }
  
  .analytics-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  @media (max-width: 960px) {
    .analytics-charts-row {
      grid-template-columns: 1fr;
    }
    .analytics-manual-form {
      grid-template-columns: 1fr;
    }
    .analytics-manual-header {
      flex-direction: column;
      align-items: flex-start;
    }
  }
  
  .analytics-chart-panel {
    min-height: 360px;
  }

  .chart-container {
    position: relative;
    height: 280px;
    width: 100%;
  }
  
  .chart-container.chart-wide {
    height: 320px;
  }

  .metrics-meta {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .metrics-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .metrics-period {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
  }
  
  /* Risk Matrix Table */
  .risk-matrix {
    overflow-x: auto;
  }
  
  .risk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  
  .risk-table th,
  .risk-table td {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid var(--border);
  }
  
  .risk-table th {
    background: var(--surface);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
  }
  
  .risk-table .category-name {
    text-align: left;
    font-weight: 500;
    text-transform: capitalize;
  }
  
  .risk-cell {
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  
  .risk-cell:hover {
    transform: scale(1.1);
  }
  
  .risk-cell.risk-critical {
    background: rgba(255, 68, 68, 0.15);
    color: #ff6b6b;
  }
  
  .risk-cell.risk-high {
    background: rgba(255, 136, 68, 0.15);
    color: #ffa94d;
  }
  
  .risk-cell.risk-medium {
    background: rgba(255, 193, 7, 0.12);
    color: #ffd43b;
  }
  
  .risk-cell.risk-low {
    background: rgba(46, 204, 113, 0.12);
    color: #69db7c;
  }
  
  th.risk-critical { color: #ff6b6b; }
  th.risk-high { color: #ffa94d; }
  th.risk-medium { color: #ffd43b; }
  th.risk-low { color: #69db7c; }
  
  /* Emerging Threats List */
  .threats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
  }
  
  .threat-item {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  }
  
  .threat-item:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.04);
  }
  
  .threat-item.priority-critical {
    border-left: 3px solid #ff4444;
  }
  
  .threat-item.priority-high {
    border-left: 3px solid #ff8844;
  }
  
  .threat-item.priority-medium {
    border-left: 3px solid #ffaa44;
  }
  
  .threat-item.priority-low {
    border-left: 3px solid #44cc44;
  }
  
  .threat-title {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .threat-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
  }
  
  .tirm-score {
    color: var(--muted);
    font-weight: 500;
    font-family: var(--font-mono);
  }
  
  .badge-critical {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  .badge-high {
    background: linear-gradient(135deg, #ff8844, #cc5500);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  .badge-medium {
    background: linear-gradient(135deg, #ffaa44, #cc8800);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  .badge-low {
    background: linear-gradient(135deg, #44cc44, #22aa22);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  /* Recommendations List */
  .recommendations-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .recommendations-list li {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--surface), rgba(17,24,39,0.6));
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    position: relative;
    padding-left: 20px;
  }
  
  .recommendations-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--btn));
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  
  .recommendations-list li:hover {
    background: rgba(56, 189, 248, 0.06);
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.2);
  }
  
  .recommendations-list li:hover::before {
    opacity: 1;
  }
  
  /* Tag and keyword clouds */
  .keywords-cloud,
  .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
  }

  .keyword-tag,
  .tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 24px;
    color: var(--accent);
    font-weight: 500;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.2s ease, 
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    cursor: default;
  }

  .keyword-tag:hover,
  .tag-cloud-item:hover {
    transform: scale(1.08) translateY(-2px);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.12));
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
  }

  .keyword-tag small,
  .tag-cloud-item small {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.8em;
    opacity: 0.8;
  }
  
  /* Analytics Priority Distribution Bars */
  .priority-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  
  .priority-bar {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .priority-bar-label {
    width: 70px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .priority-bar-track {
    flex: 1;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
  }
  
  .priority-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .priority-bar-fill.critical { background: linear-gradient(90deg, #ff4444, #ff6b6b); }
  .priority-bar-fill.high { background: linear-gradient(90deg, #ff8844, #ffa94d); }
  .priority-bar-fill.medium { background: linear-gradient(90deg, #ffaa44, #ffd43b); }
  .priority-bar-fill.low { background: linear-gradient(90deg, #44cc44, #69db7c); }
  
  .priority-bar-value {
    width: 40px;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    font-family: var(--font-mono);
  }
  
  /* Analytics Empty State */
  .analytics-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
  }
  
  .analytics-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  .analytics-empty h4 {
    margin: 0 0 8px 0;
    color: var(--text);
  }
  
  .analytics-empty p {
    margin: 0;
    font-size: 14px;
  }
  
  /* Sparkline mini charts */
  .sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 32px;
  }
  
  .sparkline-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--accent), var(--btn));
    border-radius: 2px 2px 0 0;
    min-width: 4px;
    transition: height 0.3s ease;
  }
  
  /* Analytics card hover glow */
  .panel.analytics-glow:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 40px rgba(56, 189, 248, 0.08);
  }
  
  /* ========== Console Hero Section ========== */
  
  .console-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 100px 24px 40px;
    text-align: center;
    transition: min-height 0.4s ease, padding 0.4s ease;
  }
  
  .console-hero.compact {
    min-height: auto;
    padding: 100px 24px 20px;
  }
  
  .console-hero.compact .hero-branding {
    display: none;
  }
  
  /* Hero Branding */
  .hero-branding {
    margin-bottom: 32px;
    animation: heroFadeIn 0.6s ease-out;
  }

  .hero-run-mascot {
    display: none;
    width: min(900px, 92vw);
    height: clamp(118px, 18vw, 230px);
    margin: 0 auto -14px;
    pointer-events: none;
    user-select: none;
  }

  .hero-run-mascot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 0 24px rgba(37, 99, 235, 0.22));
  }

  .console-hero.compact .hero-run-mascot {
    display: block;
    animation: heroFadeIn 0.45s ease-out both;
  }

  .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--btn) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .hero-subtitle {
    font-size: 1.15rem;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
  }
  
  @keyframes heroFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Hero Input Wrapper */
  .hero-input-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    animation: heroFadeIn 0.6s ease-out 0.1s both;
  }
  
  .hero-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, var(--panel), rgba(12, 23, 51, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(56, 189, 248, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  }
  
  .hero-input-group:hover {
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 
                0 0 0 1px rgba(56, 189, 248, 0.1);
  }
  
  .hero-input-group:focus-within {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 
                0 0 40px rgba(56, 189, 248, 0.15),
                0 0 0 1px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
  }
  
  .hero-input-icon {
    width: 24px;
    height: 24px;
    color: var(--muted);
    margin-left: 16px;
    flex-shrink: 0;
    transition: color 0.2s ease;
  }
  
  .hero-input-group:focus-within .hero-input-icon {
    color: var(--accent);
  }
  
  .hero-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    padding: 18px 16px !important;
    font-size: 17px !important;
    color: var(--text);
    outline: none;
    box-shadow: none !important;
  }
  
  .hero-input::placeholder {
    color: var(--muted);
    opacity: 0.7;
  }
  
  .hero-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    margin: 0;
    background: linear-gradient(135deg, var(--btn), var(--btn2));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
  }
  
  .hero-submit-btn:hover {
    background: linear-gradient(135deg, var(--btn-hover), var(--btn));
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
  }
  
  .hero-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  }
  
  .hero-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .hero-submit-btn i, .hero-submit-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .hero-hint {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    opacity: 0.7;
  }

  .quick-reports {
    width: 100%;
    max-width: 760px;
    margin-top: 22px;
    animation: heroFadeIn 0.6s ease-out 0.16s both;
  }

  .quick-reports-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.8;
  }

  .quick-reports-title i,
  .quick-reports-title svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
  }

  .quick-reports-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }

  .console-reports-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.36);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .console-reports-link:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.36);
    color: var(--text);
    transform: translateY(-1px);
  }

  .console-reports-link i,
  .console-reports-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  .quick-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.58);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .quick-report-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.36);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.12);
  }

  .quick-report-btn:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .quick-report-btn i,
  .quick-report-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  .console-workspace {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
  }
  
  .console-workspace.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  
  .console-hero.compact + .console-workspace .status-grid {
    margin-top: 20px;
  }
  
  @media (max-width: 640px) {
    .console-hero {
      padding: 80px 16px 30px;
    }

    .hero-run-mascot {
      width: min(540px, 96vw);
      height: 108px;
      margin-bottom: -8px;
    }

    .hero-title {
      font-size: 1.75rem;
    }
    
    .hero-subtitle {
      font-size: 1rem;
    }
    
    .hero-input-wrapper {
      max-width: 100%;
    }
    
    .hero-input-group {
      padding: 4px;
    }
    
    .hero-input-icon {
      margin-left: 12px;
    }
    
    .hero-input {
      padding: 14px 12px !important;
      font-size: 15px !important;
    }
    
    .hero-submit-btn {
      padding: 12px 16px;
      font-size: 14px;
    }
    
    .quick-reports {
      margin-top: 18px;
    }

    .quick-reports-list {
      gap: 7px;
    }

    .quick-report-btn {
      min-height: 34px;
      padding: 8px 11px;
      font-size: 12px;
    }

  }
  
/* ========== Period Comparison Cards ========== */
.period-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .period-comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .period-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.period-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.period-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--btn));
  opacity: 0.6;
}

.period-card--day::before {
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.period-card--week::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.period-card--month::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.period-card--quarter::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.period-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.period-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.period-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trend-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.trend-indicator svg {
  width: 16px;
  height: 16px;
}

.trend-up {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.trend-down {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.trend-stable {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.period-card-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 12px;
}

.period-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.period-tirm, .period-high {
  display: flex;
  align-items: center;
  gap: 4px;
}

.period-high {
  color: #f59e0b;
}

/* ========== CVE and Vulnerabilities Section ========== */
.cve-stats-header {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.cve-stat-badge {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 16px 24px;
  min-width: 140px;
}

.cve-stat-badge--vuln {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(192, 57, 43, 0.1));
  border-color: rgba(231, 76, 60, 0.3);
}

.cve-stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cve-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.cve-section {
  margin-top: 24px;
}

.cve-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vuln-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vuln-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  border-left: 3px solid var(--muted);
}

.vuln-item:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: var(--accent);
}

.vuln-item.priority-high {
  border-left-color: #e74c3c;
}

.vuln-item.priority-critical {
  border-left-color: #9b59b6;
}

.vuln-item.priority-medium {
  border-left-color: #f1c40f;
}

.vuln-item.priority-low {
  border-left-color: #2ecc71;
}

.vuln-title {
  margin-bottom: 8px;
}

.vuln-title a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.vuln-title a:hover {
  color: var(--accent);
}

.vuln-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.vuln-source {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.cve-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cve-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.15));
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #ff6b6b;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.cve-tag small {
  font-weight: 400;
  opacity: 0.7;
}

/* ========== Graph ========== */
.graph-shell{
  max-width:1460px;
}

.graph-topic-shell{
  max-width:1280px;
}

.graph-page,
.graph-topic-page{
  font-family:"Manrope", var(--font-sans);
}

.graph-hero,
.graph-topic-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.graph-hero-copy,
.graph-topic-hero-copy{
  display:grid;
  gap:8px;
}

.graph-section-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(56,189,248,0.18);
  background:rgba(12,21,40,0.7);
  color:#b7dff3;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

.graph-section-kicker::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(180deg, #7dd3fc, #38bdf8);
  box-shadow:0 0 10px rgba(56,189,248,0.32);
}

.graph-topic-hero{
  flex-direction:column;
  align-items:stretch;
}

.graph-topic-hero-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.graph-topic-color{
  width:18px;
  height:56px;
  border-radius:999px;
  box-shadow:0 0 14px rgba(56,189,248,0.24), 0 0 36px rgba(56,189,248,0.08);
}

.graph-subtitle{
  margin:8px 0 0;
  color:var(--muted);
  max-width:760px;
  line-height:1.6;
}

.graph-hero-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.graph-hero-note{
  display:grid;
  gap:4px;
  min-width:180px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(56,189,248,0.12);
  background:linear-gradient(180deg, rgba(10,18,35,0.85), rgba(12,21,40,0.7));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

.graph-hero-note-label{
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.12em;
}

.graph-topic-hero-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:flex-start;
}

.graph-toolbar{
  display:grid;
  gap:16px;
  margin-bottom:24px;
  padding:20px 22px;
  background:
    linear-gradient(180deg, rgba(14,23,42,0.95), rgba(9,16,31,0.92)),
    radial-gradient(circle at top right, rgba(56,189,248,0.07), transparent 38%);
}

.graph-toolbar-main{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.graph-toolbar-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.graph-filters{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:end;
}

.graph-filter{
  display:grid;
  gap:8px;
  min-width:180px;
}

.graph-filter-primary{
  min-width:220px;
}

.graph-toolbar-meta{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  flex-wrap:wrap;
  gap:10px;
}

.graph-meta-pill,
.graph-mini-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(56,189,248,0.18);
  background:linear-gradient(180deg, rgba(12,22,39,0.88), rgba(8,15,30,0.82));
  color:var(--muted);
  font-size:13px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

.graph-meta-pill{
  justify-content:space-between;
}

.graph-meta-pill-label{
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

.graph-meta-pill-value{
  color:var(--text);
  font-size:15px;
  font-weight:700;
}

.graph-meta-pill-strong .graph-meta-pill-value,
.graph-meta-pill-strong{
  color:#d8f3ff;
}

.graph-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.85fr) minmax(320px, 0.95fr);
  gap:24px;
  align-items:start;
}

.graph-stage{
  min-height:720px;
  padding-bottom:22px;
}

.graph-stage-header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:18px;
}

.graph-stage-hint{
  margin:10px 0 0;
}

.graph-stage-status{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(56,189,248,0.18);
  background:rgba(17,24,39,0.78);
  color:var(--accent);
  font-size:13px;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.graph-scene{
  position:relative;
  min-height:620px;
  overflow:hidden;
  border-radius:22px;
  border:1px solid rgba(56,189,248,0.1);
  background:
    linear-gradient(180deg, rgba(6,11,22,0.96), rgba(10,16,31,0.98)),
    radial-gradient(circle at 18% 18%, rgba(56,189,248,0.08), transparent 24%),
    radial-gradient(circle at 82% 24%, rgba(99,102,241,0.08), transparent 28%),
    radial-gradient(circle at 48% 78%, rgba(14,165,233,0.05), transparent 26%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    inset 0 0 0 1px rgba(56,189,248,0.03),
    0 20px 48px rgba(0,0,0,0.28);
}

.graph-scene::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(148,163,184,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.035) 1px, transparent 1px);
  background-size:32px 32px;
  opacity:0.35;
  pointer-events:none;
}

.graph-scene::after{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.03);
  pointer-events:none;
}

.graph-canvas{
  position:relative;
  z-index:1;
  min-height:620px;
}

.graph-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  z-index:2;
  padding:28px;
  color:var(--muted);
  text-align:center;
  background:rgba(7,13,26,0.76);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}

.graph-overlay[hidden]{
  display:none;
}

.graph-overlay > *{
  position:relative;
  z-index:1;
}

.graph-overlay::before{
  content:"";
  position:absolute;
  min-width:320px;
  min-height:180px;
  border-radius:22px;
  border:1px dashed rgba(56,189,248,0.20);
  background:linear-gradient(180deg, rgba(10,18,34,0.88), rgba(8,14,28,0.92));
  box-shadow:0 10px 30px rgba(0,0,0,0.24);
}

.graph-overlay strong{
  color:var(--text);
  font-size:18px;
}

.graph-overlay i,
.graph-overlay svg{
  width:28px;
  height:28px;
  color:var(--accent);
}

.graph-sidebar{
  display:grid;
  grid-template-rows:minmax(420px, 1.45fr) auto;
  gap:24px;
}

.graph-side-panel{
  min-height:320px;
}

.graph-side-panel[data-ui="publication-card"]{
  display:flex;
  flex-direction:column;
  min-height:420px;
}

.graph-side-panel[data-ui="publication-card"] .graph-publication-card{
  flex:1;
}

.graph-panel-subtitle{
  margin:-4px 0 16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

.graph-topic-list{
  display:grid;
  gap:14px;
}

.graph-topic-summary{
  position:relative;
  display:grid;
  gap:10px;
  border:1px solid rgba(56,189,248,0.12);
  border-radius:16px;
  padding:14px 16px;
  background:
    linear-gradient(180deg, rgba(12,20,38,0.90), rgba(9,16,31,0.84)),
    radial-gradient(circle at top right, rgba(56,189,248,0.05), transparent 40%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

.graph-topic-summary-header{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
}

.graph-topic-summary-title{
  display:flex;
  align-items:center;
  gap:10px;
}

.graph-topic-summary-count{
  display:grid;
  gap:2px;
  min-width:84px;
  text-align:right;
}

.graph-topic-summary-count-value{
  color:var(--text);
  font-size:18px;
  font-weight:700;
  line-height:1.1;
}

.graph-topic-summary-count-label{
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

.graph-topic-summary-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
}

.graph-topic-summary-close{
  position:absolute;
  top:8px;
  right:8px;
  width:24px;
  height:24px;
  padding:0;
  border-radius:50%;
  background:rgba(56,189,248,0.08);
  border:1px solid rgba(56,189,248,0.16);
  color:var(--muted);
  box-shadow:none;
}

.graph-topic-summary-close:hover{
  color:var(--text);
}

.graph-topic-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  box-shadow:0 0 12px currentColor;
}

.graph-publication-card,
.graph-card-body{
  display:grid;
  gap:14px;
}

.graph-publication-card{
  min-height:100%;
}

.graph-card-body{
  position:relative;
  min-height:100%;
  padding:2px 0;
  align-content:start;
}

.graph-card-header,
.topic-publication-header{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}

.graph-card-topline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.graph-card-topic{
  color:#9fd3ea;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:0.04em;
  margin-bottom:6px;
  font-weight:700;
}

.graph-source-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(56,189,248,0.16);
  background:rgba(10,18,34,0.62);
  color:#d2e8f4;
  font-size:11px;
  font-weight:600;
}

.graph-score-meter{
  position:relative;
  height:8px;
  border-radius:999px;
  background:rgba(56,189,248,0.10);
  overflow:hidden;
  border:1px solid rgba(56,189,248,0.08);
}

.graph-score-meter-bar{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #367fa8, #58aad1);
  box-shadow:0 0 10px rgba(56,189,248,0.18);
}

.graph-card-text,
.topic-publication-text{
  margin:0;
  color:var(--text);
  line-height:1.6;
  white-space:pre-wrap;
}

.graph-card-text-wrap{
  max-height:320px;
  overflow:auto;
  padding-right:6px;
  scrollbar-width:thin;
  scrollbar-color:rgba(56,189,248,0.28) rgba(15,23,42,0.32);
}

.graph-card-text-wrap::after{
  content:none;
}

.graph-card-text-wrap::-webkit-scrollbar{
  width:8px;
}

.graph-card-text-wrap::-webkit-scrollbar-track{
  background:rgba(15,23,42,0.32);
  border-radius:999px;
}

.graph-card-text-wrap::-webkit-scrollbar-thumb{
  background:rgba(56,189,248,0.28);
  border-radius:999px;
}

.graph-card-text-wrap::-webkit-scrollbar-thumb:hover{
  background:rgba(56,189,248,0.42);
}

.graph-card-meta,
.topic-publication-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color:var(--muted);
  font-size:13px;
}

.graph-card-stat{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--text);
}

.graph-card-stat-label{
  color:var(--muted);
}

.graph-card-tags,
.topic-publication-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.graph-topic-listing{
  display:grid;
  gap:18px;
}

.topic-publication-card{
  display:grid;
  gap:14px;
}

.graph-empty-list{
  display:grid;
  place-items:center;
  text-align:center;
  min-height:220px;
}

.analytics-mail-news-panel .analytics-manual-status{
  display:block;
  margin:10px 0;
}

.analytics-mail-news-panel .analytics-manual-status.success{
  border-color:rgba(34,197,94,.35);
  color:#86efac;
}

.analytics-mail-news-panel .analytics-manual-status.error{
  border-color:rgba(239,68,68,.35);
  color:#fca5a5;
}

.analytics-mail-news-send{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin:0;
}

.analytics-mail-news-send input{
  flex:1 1 240px;
  min-width:min(280px, 100%);
  max-width:100%;
}

.analytics-mail-news-panel .metrics-actions{
  align-items:center;
}

.analytics-mail-news-panel .analytics-manual-table{
  display:block;
  table-layout:auto;
}

.analytics-mail-news-panel .analytics-manual-table thead,
.analytics-mail-news-panel .analytics-manual-table tbody{
  display:block;
}

.analytics-mail-news-panel .analytics-manual-table tr{
  display:grid;
  grid-template-columns:38px minmax(150px,.9fr) minmax(150px,1fr) minmax(150px,1fr) minmax(150px,1fr) 82px;
  column-gap:10px;
  row-gap:8px;
  align-items:center;
}

.analytics-mail-news-panel .analytics-manual-table th,
.analytics-mail-news-panel .analytics-manual-table td{
  display:block;
  min-width:0;
  padding:10px 0;
}

.analytics-mail-news-number{
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}

.analytics-mail-news-row{
  display:block;
  margin:0;
}

.analytics-mail-news-field input{
  width:100%;
  height:42px;
  min-width:0;
  box-sizing:border-box;
}

.analytics-mail-news-preview{
  display:block;
  min-width:0;
  min-height:42px;
  padding:11px 12px;
  border:1px solid rgba(148,163,184,.16);
  border-radius:10px;
  background:rgba(15,23,42,.52);
  color:var(--text);
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.analytics-mail-news-row.is-saving{
  opacity:.75;
}

.analytics-mail-news-row.is-saved input,
.analytics-mail-news-row.is-saved .analytics-mail-news-preview{
  border-color:rgba(34,197,94,.45);
}

.analytics-mail-news-row.is-error input,
.analytics-mail-news-row.is-error .analytics-mail-news-preview{
  border-color:rgba(239,68,68,.55);
}

.analytics-mail-news-remove{
  margin:8px 0 0;
}

.graph-empty-list i,
.graph-empty-list svg{
  width:28px;
  height:28px;
  color:var(--accent);
}

@media (max-width: 1100px){
  .graph-layout{
    grid-template-columns:1fr;
  }

  .graph-toolbar-meta{
    grid-template-columns:1fr;
  }

  .graph-stage{
    min-height:unset;
  }

  .graph-topic-hero-main{
    flex-direction:column;
  }

  .graph-canvas{
    min-height:520px;
  }
}

@media (max-width: 720px){
  .graph-hero,
  .graph-topic-hero-main,
  .graph-stage-header,
  .graph-card-header,
  .topic-publication-header{
    flex-direction:column;
  }

  .graph-toolbar-main{
    flex-direction:column;
    align-items:stretch;
  }

  .graph-toolbar-actions{
    justify-content:flex-start;
  }

  .graph-filter{
    min-width:100%;
  }

  .graph-canvas{
    min-height:420px;
  }

  .graph-topic-summary-header{
    padding-right:30px;
  }

  .graph-topic-summary-count{
    min-width:unset;
    text-align:left;
  }
}
