:root {
    --ink-900: #122033;
    --ink-700: #334155;
    --ink-500: #667085;
    --line: rgba(143, 165, 184, 0.22);
    --paper: rgba(255, 255, 255, 0.78);
    --paper-solid: #ffffff;
    --warm: #fffaf3;
    --aqua: #32b7c6;
    --blue: #3d8bfd;
    --mint: #4fc79a;
    --orange: #f4a261;
    --violet: #8b7cc8;
    --danger: #d95c5c;
    --shadow: 0 18px 48px rgba(50, 74, 105, 0.12);
    --shadow-color: 0 18px 42px rgba(50, 183, 198, 0.14), 0 8px 22px rgba(244, 162, 97, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding-bottom: 54px;
    color: var(--ink-700);
    font-size: 16px;
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 10%, rgba(79, 199, 154, 0.30), transparent 24%),
        radial-gradient(circle at 92% 12%, rgba(244, 162, 97, 0.28), transparent 26%),
        radial-gradient(circle at 74% 86%, rgba(139, 124, 200, 0.22), transparent 28%),
        radial-gradient(circle at 40% 42%, rgba(61, 139, 253, 0.13), transparent 32%),
        linear-gradient(135deg, #fff8ef 0%, #eafbf7 38%, #f4f1ff 72%, #fff6eb 100%) !important;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(50, 183, 198, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 183, 198, 0.12) 1px, transparent 1px);
    background-size: 54px 54px, 54px 54px;
    background-repeat: repeat, repeat;
    animation: dataGridMove 22s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    left: -80vw;
    top: -34vh;
    width: 260vw;
    height: 3px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.42;
    background: linear-gradient(90deg, transparent 0 5%, rgba(61, 139, 253, 0.10) 12%, rgba(61, 139, 253, 0.34) 50%, rgba(50, 183, 198, 0.14) 88%, transparent 96% 100%);
    border-radius: 999px;
    filter: blur(2px);
    box-shadow:
        0 260px 5px rgba(61, 139, 253, 0.22),
        0 520px 5px rgba(61, 139, 253, 0.20),
        0 780px 5px rgba(61, 139, 253, 0.18),
        0 1040px 5px rgba(61, 139, 253, 0.16);
    transform: rotate(62deg) translate3d(0, 0, 0);
    transform-origin: center;
    animation: diagonalLineSweep 18s linear infinite;
}

@keyframes dataGridMove {
    from { background-position: 0 0, 0 0; }
    to { background-position: 54px 54px, 54px 54px; }
}

@keyframes diagonalLineSweep {
    from { transform: rotate(62deg) translate3d(-90px, -70px, 0); }
    to { transform: rotate(62deg) translate3d(90px, 70px, 0); }
}

.app-shell {
    min-height: 100vh;
    padding-left: 248px;
}

.app-sidebar {
    position: fixed;
    inset: 18px auto 18px 18px;
    z-index: 20;
    width: 212px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(242, 255, 251, 0.76)),
        linear-gradient(135deg, rgba(50, 183, 198, 0.12), rgba(244, 162, 97, 0.08));
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.sidebar-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 12px;
    border-bottom: 1px solid var(--line);
}

.sidebar-mark i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--aqua), var(--blue) 58%, var(--violet));
    box-shadow: 0 10px 24px rgba(50, 183, 198, 0.32);
}

.sidebar-mark span {
    color: var(--ink-900);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink-500);
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-nav a i {
    width: 18px;
    text-align: center;
    color: #6aa8b2;
}

.app-nav a:hover,
.app-nav a.active {
    color: #0d5d6d;
    background:
        linear-gradient(135deg, rgba(50, 183, 198, 0.20), rgba(79, 199, 154, 0.16)),
        linear-gradient(90deg, rgba(244, 162, 97, 0.14), transparent);
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 rgba(50, 183, 198, 0.72);
}

.app-nav a.active i {
    color: var(--aqua);
}

.sidebar-foot {
    margin-top: auto;
    padding: 12px;
    border-radius: 8px;
    color: #64748b;
    background: linear-gradient(135deg, rgba(238, 249, 247, 0.92), rgba(255, 244, 223, 0.86));
    border: 1px solid rgba(50, 183, 198, 0.12);
    font-size: 12px;
    line-height: 1.6;
}

.app-main {
    width: min(1320px, calc(100vw - 288px));
    margin: 0 auto;
    padding: 34px 28px 48px;
}

.page-title {
    margin: 0 0 8px;
    color: var(--ink-900) !important;
    font-size: 34px !important;
    font-weight: 900;
    letter-spacing: 0 !important;
}

.page-subtitle {
    max-width: 860px;
    color: var(--ink-500);
    font-size: 16px;
    line-height: 1.8;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.card-box,
.glass-card,
.stat-box,
.metric,
.mini-metric,
.result-panel,
.summary-card,
.info-panel {
    border: 1px solid rgba(255, 255, 255, 0.76) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-color) !important;
}

.card-box {
    padding: 26px !important;
    margin-bottom: 20px;
}

.card-box:hover {
    transform: none !important;
    background: var(--paper) !important;
}

.card-inner-title,
.stat-title {
    color: var(--ink-700) !important;
    font-size: 16px;
    font-weight: 800;
}

.stat-number,
.stat-value,
.mini-metric-value,
.metric .value {
    color: var(--ink-900);
    font-weight: 850;
}

.stat-number,
.stat-value {
    font-size: 42px !important;
    background: linear-gradient(135deg, #122033, #147184 54%, #8b7cc8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mini-metric-value,
.metric .value {
    font-size: 30px !important;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary,
.btn-success {
    border: 0;
    background: linear-gradient(135deg, #22aebd, #3d8bfd 62%, #8b7cc8);
    box-shadow: 0 12px 24px rgba(50, 183, 198, 0.30);
}

.btn-primary:hover,
.btn-success:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #147184;
    border-color: rgba(50, 183, 198, 0.42);
}

.btn-outline-primary:hover {
    border-color: transparent;
    background: #32b7c6;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: rgba(143, 165, 184, 0.42);
    background-color: rgba(255, 255, 255, 0.82);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(50, 183, 198, 0.72);
    box-shadow: 0 0 0 4px rgba(50, 183, 198, 0.14);
}

.table {
    color: var(--ink-700);
    margin-bottom: 0;
    font-size: 15px;
}

.table thead th {
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
    border-bottom-color: rgba(143, 165, 184, 0.24) !important;
}

.table>:not(caption)>*>* {
    background: transparent;
    border-bottom-color: rgba(143, 165, 184, 0.16);
    vertical-align: middle;
    padding: 15px 12px;
}

.table-hover tbody tr:hover td {
    background: rgba(50, 183, 198, 0.06);
}

.badge-high,
.badge-danger {
    background: #fff0ed !important;
    color: #b94141 !important;
}

.badge-mid {
    background: #fff4df !important;
    color: #a86413 !important;
}

.badge-low,
.badge-success {
    background: #eaf8f2 !important;
    color: #13785a !important;
}

.chart-box {
    height: 360px !important;
}

.navbar {
    display: none !important;
}

.site-icp {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 60;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: calc(100vw - 32px);
    padding: 7px 16px;
    border: 1px solid rgba(143, 165, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: rgba(71, 85, 105, 0.82);
    box-shadow: 0 10px 28px rgba(50, 74, 105, 0.10);
    backdrop-filter: blur(16px);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .app-shell {
        padding-left: 0;
    }

    .app-sidebar {
        position: sticky;
        inset: 0;
        width: auto;
        margin: 10px;
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-mark,
    .sidebar-foot {
        display: none;
    }

    .app-nav {
        display: flex;
        gap: 8px;
        min-width: max-content;
    }

    .app-main {
        width: 100%;
        padding: 18px 14px 58px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}
