:root {
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-ink: #172033;
    --app-muted: #66758a;
    --app-border: #dfe6ef;
    --app-border-strong: #cbd5e1;
    --app-primary: #2457d6;
    --app-primary-dark: #1944b3;
    --app-primary-soft: #eaf0ff;
    --app-success: #15805d;
    --app-warning: #b66a0b;
    --app-danger: #c83c4a;
    --app-radius: 10px;
    --app-shadow: 0 14px 38px rgba(24, 41, 72, 0.08), 0 2px 8px rgba(24, 41, 72, 0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--app-ink);
    font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: #bed0ff;
    color: #10295f;
}

:focus-visible {
    outline: 3px solid rgba(36, 87, 214, 0.28);
    outline-offset: 2px;
}

a {
    text-underline-offset: 0.2em;
}

.navbar.bg-dark {
    min-height: 64px;
    background: #15223a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 22px rgba(15, 28, 51, 0.16);
}

.navbar-brand {
    font-weight: 750;
    letter-spacing: -0.02em;
}

.navbar-text {
    color: #d7e0f0 !important;
}

.app-subnav {
    position: sticky;
    top: 0;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 3px 12px rgba(24, 41, 72, 0.04);
    backdrop-filter: blur(12px);
}

.subnav-link {
    position: relative;
    flex: 0 0 auto;
    padding: 0.45rem 0.15rem;
    color: #46566d;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease;
}

.subnav-link::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--app-primary);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease-out;
}

.subnav-link:hover {
    color: var(--app-primary);
}

.subnav-link:hover::after {
    transform: scaleX(1);
}

main.container {
    max-width: 1240px;
}

h1,
h2,
h3 {
    color: #17233a;
    font-weight: 750;
    letter-spacing: -0.025em;
}

h1 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
}

.text-muted {
    color: var(--app-muted) !important;
}

.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: 0 5px 18px rgba(24, 41, 72, 0.045);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.card:hover {
    border-color: #cad6e6;
    box-shadow: 0 12px 28px rgba(24, 41, 72, 0.08);
}

.card-body {
    padding: 1.35rem;
}

.btn {
    min-height: 40px;
    border-radius: 8px;
    font-weight: 650;
    box-shadow: none !important;
    transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--app-primary-dark);
    background: var(--app-primary-dark);
}

.btn-outline-primary {
    border-color: #9cb4eb;
    color: var(--app-primary);
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: var(--app-border-strong);
    border-radius: 8px;
    background-color: #fff;
    color: var(--app-ink);
}

.form-control:focus,
.form-select:focus {
    border-color: #7395e5;
    box-shadow: 0 0 0 0.22rem rgba(36, 87, 214, 0.13);
}

textarea.form-control {
    min-height: 112px;
}

.form-label {
    margin-bottom: 0.45rem;
    color: #34445c;
    font-weight: 650;
}

.form-check.border {
    padding: 1rem 1rem 1rem 2.5rem !important;
    border-color: var(--app-border) !important;
    background: var(--app-surface-soft);
    transition: border-color 160ms ease, background 160ms ease;
}

.form-check.border:has(.form-check-input:checked) {
    border-color: #7797df !important;
    background: var(--app-primary-soft);
}

.table-responsive {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: 0 5px 18px rgba(24, 41, 72, 0.04);
}

.table {
    margin-bottom: 0;
    color: var(--app-ink);
}

.table > :not(caption) > * > * {
    padding: 0.85rem 1rem;
    border-bottom-color: #e9eef5;
    vertical-align: middle;
}

.table thead th {
    background: #f7f9fc;
    color: #53627a;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color 130ms ease;
}

.table tbody tr:hover {
    background: #f8faff;
}

.table td:first-child,
.stat,
.display-6,
.code-cell {
    font-variant-numeric: tabular-nums;
}

.alert {
    border: 1px solid transparent;
    border-radius: 9px;
}

.alert-info {
    border-color: #c8d9f4;
    background: #edf5ff;
    color: #24496f;
}

.alert-success {
    border-color: #bde3d4;
    background: #ebf8f2;
    color: #176047;
}

.alert-warning {
    border-color: #f0d7aa;
    background: #fff8e9;
    color: #795118;
}

.alert-danger {
    border-color: #efc2c8;
    background: #fff0f2;
    color: #842f3a;
}

.hero {
    position: relative;
    overflow: hidden;
    margin: -1.5rem calc(50% - 50vw) 2.5rem;
    padding: clamp(4rem, 10vw, 7.5rem) max(1rem, calc((100vw - 1208px) / 2));
    background: #15223a;
    color: #fff;
}

.hero::after {
    position: absolute;
    top: 0;
    right: 5%;
    width: min(42vw, 560px);
    height: 100%;
    background-image: linear-gradient(rgba(95, 137, 232, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 137, 232, 0.16) 1px, transparent 1px);
    background-size: 32px 32px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000);
}

.hero > * {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    line-height: 1.08;
}

.hero p {
    max-width: 620px;
    color: #c8d5ea;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.hero .btn-primary {
    margin-top: 0.8rem;
    padding: 0.75rem 1.25rem;
    border-color: #fff;
    background: #fff;
    color: #173a8c;
}

.empty-state {
    padding: 3.5rem 1.5rem;
    border: 1px dashed #b9c7da;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    text-align: center;
    color: var(--app-muted);
}

.pagination {
    margin-top: 1.25rem;
}

.page-link {
    border-color: var(--app-border);
    color: var(--app-primary);
}

.page-item.active .page-link {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.text-break,
.code-cell {
    overflow-wrap: anywhere;
}

.install-body {
    min-height: 100vh;
    background: #edf2f8;
}

.install-shell {
    width: min(100% - 2rem, 760px);
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 5rem) 0 2rem;
}

.install-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}

.install-brand strong,
.install-brand small {
    display: block;
}

.install-brand strong {
    font-size: 1.05rem;
}

.install-brand small {
    margin-top: 0.15rem;
    color: var(--app-muted);
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 9px;
    background: #173a8c;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(23, 58, 140, 0.22);
}

.install-card {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.install-card::before {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--app-primary);
    content: "";
}

.install-card-body {
    padding: clamp(1.4rem, 5vw, 2.4rem);
}

.install-foot {
    margin-top: 1rem;
    color: var(--app-muted);
    font-size: 0.82rem;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 767.98px) {
    .navbar.bg-dark {
        min-height: 58px;
    }

    main.container {
        padding-inline: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero {
        margin-top: -1.5rem;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero::after {
        right: -30%;
        width: 85vw;
        opacity: 0.55;
    }

    .table > :not(caption) > * > * {
        padding: 0.72rem 0.8rem;
    }

    .install-shell {
        width: min(100% - 1rem, 760px);
        padding-top: 1.25rem;
    }
}
