body.app-shell {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #050a15;
    color: #e2e8f0;
    background-image:
        linear-gradient(rgba(10, 20, 40, 0.92), rgba(5, 10, 21, 0.97)),
        url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z" fill="%230f172a" fill-opacity="0.42" fill-rule="evenodd"/></svg>');
}

.tech-font {
    font-family: 'Orbitron', sans-serif;
}

.panel-glass {
    background: rgba(13, 25, 48, 0.64);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.08) inset;
    border-radius: 8px;
    position: relative;
}

.panel-glass::before,
.panel-glass::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
}

.panel-glass::before {
    top: 0;
    left: 0;
    border-top: 2px solid #38bdf8;
    border-left: 2px solid #38bdf8;
    border-top-left-radius: 8px;
}

.panel-glass::after {
    right: 0;
    bottom: 0;
    border-right: 2px solid #38bdf8;
    border-bottom: 2px solid #38bdf8;
    border-bottom-right-radius: 8px;
}

.glow-text {
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    padding: 0.8rem 0.95rem;
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.35);
    transition: 160ms ease;
}

.nav-link:hover {
    border-color: rgba(56, 189, 248, 0.5);
    color: #e2e8f0;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(14, 116, 144, 0.35), rgba(15, 23, 42, 0.5));
    border-color: rgba(56, 189, 248, 0.7);
    color: #e0f2fe;
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.14) inset;
}

.metric-strip {
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.4);
    padding: 0.85rem 1rem;
    min-width: 140px;
}

.metric-card {
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.45);
    padding: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    padding-bottom: 0.75rem;
    margin-bottom: 0.9rem;
}

.section-title h2,
.section-title h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #7dd3fc;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    border: 1px solid rgba(71, 85, 105, 0.85);
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
}

.status-pill.good {
    border-color: rgba(16, 185, 129, 0.55);
    color: #6ee7b7;
}

.status-pill.warn {
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}

.status-pill.bad {
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
}

.control-input,
.control-select,
.control-textarea {
    width: 100%;
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.68);
    color: #e2e8f0;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
}

.control-textarea {
    min-height: 120px;
    resize: vertical;
}

.control-input:focus,
.control-select:focus,
.control-textarea:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.table-shell {
    width: 100%;
    border-collapse: collapse;
}

.table-shell th,
.table-shell td {
    border-bottom: 1px solid rgba(30, 41, 59, 0.85);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-size: 0.85rem;
}

.table-shell th {
    color: #7dd3fc;
    font-weight: 600;
    font-size: 0.78rem;
}

.list-item {
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.44);
    padding: 0.85rem 1rem;
}

.terminal-shell {
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 8px;
    box-shadow: inset 0 0 24px rgba(15, 23, 42, 0.7);
}

.terminal-line {
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
}

.tag-rdb {
    border-color: #3b82f6;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.16);
}

.tag-graph {
    border-color: #a855f7;
    color: #c084fc;
    background: rgba(168, 85, 247, 0.16);
}

.tag-vector {
    border-color: #10b981;
    color: #34d399;
    background: rgba(16, 185, 129, 0.16);
}

.tag-fulltext {
    border-color: #f59e0b;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
}

.timeline-item {
    position: relative;
    padding-left: 1.2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.24rem;
    top: 1rem;
    bottom: -0.8rem;
    width: 1px;
    background: rgba(51, 65, 85, 0.9);
}

.timeline-item:last-child::after {
    display: none;
}

.scroll-shell::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scroll-shell::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

.scroll-shell::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 3px;
}

.chart-box {
    min-height: 240px;
}

.chart-box.tall {
    min-height: 340px;
}

.ai-panel {
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(8, 15, 30, 0.96), rgba(5, 10, 21, 0.92)),
        rgba(2, 6, 23, 0.88);
    box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.06);
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    padding-bottom: 0.75rem;
    margin-bottom: 0.9rem;
}

.ai-header-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #7dd3fc;
}

.ai-card {
    border: 1px solid rgba(51, 65, 85, 0.75);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.55);
    padding: 0.95rem 1rem;
}

.ai-card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.ai-card-value {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.ai-stream {
    border: 1px solid rgba(51, 65, 85, 0.88);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.86);
    padding: 0.95rem 1rem;
}

.ai-stream-line {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.ai-stream-line:last-child {
    margin-bottom: 0;
}

.ai-stream-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.34rem;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    flex: 0 0 auto;
}

.ai-stream-line.live .ai-stream-dot {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
    animation: pulse-ai 1.2s infinite;
}

@keyframes pulse-ai {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.22); opacity: 0.75; }
    100% { transform: scale(1); opacity: 1; }
}

.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    background: rgba(14, 116, 144, 0.16);
    color: #e0f2fe;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
}

.ai-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.ai-note {
    border-left: 2px solid #38bdf8;
    padding-left: 0.8rem;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.6;
}

.copilot-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .copilot-shell,
    .ai-summary-grid {
        grid-template-columns: 1fr;
    }
}
