/* ==================================================================================
   工艺管理智能问答助手 —— 设计系统 / 基础层
   浅色系 · 玻璃拟态 · 动态光效
   适配 1920×1080 / 2560×1440 / 1600×900
   ================================================================================== */

/* ------------------------------------------------------------------ 设计令牌 */
:root {
    /* 品牌色 */
    --brand: #0d92cf;
    --brand-600: #0a76aa;
    --brand-700: #0a6a99;
    --brand-300: #6fcdf3;
    --brand-100: #c9eafb;
    --brand-50: #eaf7fe;

    --teal: #12a594;
    --teal-600: #0d8578;
    --teal-100: #d3f3ef;

    --sky: #0e7490;
    --sky-600: #0b5a70;
    --sky-100: #d7edf3;

    --cyan: #06a8d4;
    --cyan-100: #d5f1fb;

    /* 状态色 */
    --ok: #12a565;
    --ok-100: #d6f5e6;
    --warn: #e8901a;
    --warn-100: #fdeed6;
    --alarm: #f2683c;
    --alarm-100: #ffe6dc;
    --crit: #e23f4e;
    --crit-100: #ffe0e3;

    /* 中性色 */
    --ink: #101a2c;
    --ink-2: #33415c;
    --ink-3: #64748f;
    --ink-4: #93a0b8;
    --ink-5: #b9c3d4;

    --line: #e2e9ec;
    --line-2: #edf1f3;
    --surface: #ffffff;
    --surface-2: #f6f9fa;
    --surface-3: #eff4f6;
    --canvas: #eaf0f1;

    /* 阴影 */
    --sh-xs: 0 1px 2px rgba(16, 26, 44, .05);
    --sh-sm: 0 2px 8px rgba(16, 26, 44, .06);
    --sh-md: 0 6px 20px rgba(16, 26, 44, .08);
    --sh-lg: 0 16px 44px rgba(16, 26, 44, .11);
    --sh-xl: 0 28px 72px rgba(16, 26, 44, .15);
    --sh-brand: 0 8px 26px rgba(13, 146, 207, .26);
    --sh-inset: inset 0 1px 0 rgba(255, 255, 255, .85);

    /* 圆角 */
    --r-xs: 6px;
    --r-sm: 9px;
    --r-md: 13px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-full: 999px;

    /* 尺寸 */
    --nav-w: 212px;
    --nav-w-mini: 66px;
    --top-h: 62px;
    --gap: 16px;
    --gap-lg: 22px;

    /* 动效 */
    --e-out: cubic-bezier(.22, 1, .36, 1);
    --e-in-out: cubic-bezier(.65, 0, .35, 1);
    --e-spring: cubic-bezier(.34, 1.56, .64, 1);
    --t-fast: .16s;
    --t: .28s;
    --t-slow: .55s;

    /* 渐变 */
    --g-brand: linear-gradient(135deg, #3fc2ee 0%, #0d92cf 45%, #0a6a99 100%);
    --g-teal: linear-gradient(135deg, #2fd0bb 0%, #12a594 100%);
    --g-sky: linear-gradient(135deg, #2a9fba 0%, #0e7490 48%, #0b5a70 100%);
    --g-warm: linear-gradient(135deg, #ffb457 0%, #f2683c 100%);
    --g-sheen: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .62) 50%, rgba(255, 255, 255, 0) 70%);
}

/* 2K 及以上分辨率适度放大，保持信息密度 */
@media (min-width: 2200px) {
    :root {
        --nav-w: 244px;
        --top-h: 70px;
        --gap: 22px;
        --gap-lg: 28px;
    }

    html {
        font-size: 17px;
    }
}

@media (max-width: 1500px) {
    :root {
        --nav-w: 196px;
        --gap: 13px;
        --gap-lg: 16px;
    }

    html {
        font-size: 15px;
    }
}

/* ------------------------------------------------------------------ Reset */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei",
        "Source Han Sans CN", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, ul, ol, dl, dd {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

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

img, svg, canvas {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--brand-100);
    color: var(--brand-700);
}

/* ------------------------------------------------------------------ 滚动条 */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ccd6e6, #b9c5da);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a9b8d0, #93a4c0);
    background-clip: padding-box;
}

.scroll-y {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* ------------------------------------------------------------------ 文字工具 */
.t-xs { font-size: .6875rem; }
.t-sm { font-size: .75rem; }
.t-md { font-size: .8125rem; }
.t-lg { font-size: .9375rem; }
.t-xl { font-size: 1.125rem; }
.t-2xl { font-size: 1.5rem; }
.t-3xl { font-size: 2rem; }

.fw-4 { font-weight: 400; }
.fw-5 { font-weight: 500; }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }
.fw-8 { font-weight: 800; }

.c-1 { color: var(--ink); }
.c-2 { color: var(--ink-2); }
.c-3 { color: var(--ink-3); }
.c-4 { color: var(--ink-4); }
.c-brand { color: var(--brand); }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-alarm { color: var(--alarm); }
.c-crit { color: var(--crit); }

.mono {
    font-family: "JetBrains Mono", "Cascadia Mono", "SF Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.num {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.015em;
}

.ellip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grad-text {
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ------------------------------------------------------------------ 布局工具 */
.row { display: flex; align-items: center; }
.row-t { display: flex; align-items: flex-start; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; align-items: center; }
.end { justify-content: flex-end; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; }
.g10 { gap: 10px; } .g12 { gap: 12px; } .g14 { gap: 14px; }
.g16 { gap: 16px; } .g20 { gap: 20px; } .g24 { gap: 24px; }
.flex1 { flex: 1; min-width: 0; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.hide { display: none !important; }

/* ------------------------------------------------------------------ 全局背景光效 */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    will-change: transform;
}

.aurora i:nth-child(1) {
    width: 46vw;
    height: 46vw;
    left: -12vw;
    top: -16vw;
    background: radial-gradient(circle, rgba(56, 189, 248, .55), transparent 68%);
    animation: drift1 34s var(--e-in-out) infinite;
}

.aurora i:nth-child(2) {
    width: 40vw;
    height: 40vw;
    right: -10vw;
    top: 6vh;
    background: radial-gradient(circle, rgba(45, 208, 187, .42), transparent 68%);
    animation: drift2 42s var(--e-in-out) infinite;
}

.aurora i:nth-child(3) {
    width: 34vw;
    height: 34vw;
    left: 34vw;
    bottom: -16vw;
    background: radial-gradient(circle, rgba(45, 212, 191, .4), transparent 68%);
    animation: drift3 38s var(--e-in-out) infinite;
}

.aurora i:nth-child(4) {
    width: 26vw;
    height: 26vw;
    right: 22vw;
    bottom: -8vw;
    background: radial-gradient(circle, rgba(255, 180, 87, .3), transparent 70%);
    animation: drift1 48s var(--e-in-out) infinite reverse;
}

@keyframes drift1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(6vw, 5vh, 0) scale(1.14); }
    66% { transform: translate3d(-4vw, 9vh, 0) scale(.92); }
}

@keyframes drift2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    40% { transform: translate3d(-7vw, 7vh, 0) scale(1.18); }
    70% { transform: translate3d(3vw, -4vh, 0) scale(.9); }
}

@keyframes drift3 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(8vw, -7vh, 0) scale(1.2); }
}

/* 细网格纹理 */
.grid-tex {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(13, 146, 207, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 146, 207, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
}

/* ------------------------------------------------------------------ 通用动画 */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: none; }
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(226, 63, 78, .45); }
    70% { box-shadow: 0 0 0 12px rgba(226, 63, 78, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 63, 78, 0); }
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: .42; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes sheen {
    0% { transform: translateX(-120%) skewX(-18deg); }
    100% { transform: translateX(260%) skewX(-18deg); }
}

@keyframes dash {
    to { stroke-dashoffset: -1000; }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes widthGrow {
    from { width: 0 !important; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .12; }
}

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

@keyframes ripple {
    from { transform: scale(0); opacity: .55; }
    to { transform: scale(2.6); opacity: 0; }
}

@keyframes flowDash {
    to { stroke-dashoffset: -220; }
}

.anim-up { animation: fadeUp .5s var(--e-out) both; }
.anim-in { animation: fadeIn .4s var(--e-out) both; }
.anim-scale { animation: scaleIn .38s var(--e-spring) both; }
.anim-right { animation: slideRight .42s var(--e-out) both; }

.d1 { animation-delay: .04s; }
.d2 { animation-delay: .08s; }
.d3 { animation-delay: .12s; }
.d4 { animation-delay: .16s; }
.d5 { animation-delay: .2s; }
.d6 { animation-delay: .24s; }
.d7 { animation-delay: .28s; }
.d8 { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
