@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@500;600;700&family=Fira+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --ink: #0f172a;
    --ink-2: #1e293b;
    --muted: #64748b;
    --line: #dbe6f6;
    --line-strong: #b8c9e6;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --surface-raised: #fbfdff;
    --canvas: #eef6ff;
    --primary: #1d4ed8;
    --primary-2: #2563eb;
    --primary-3: #0f2f87;
    --accent: #06b6d4;
    --accent-2: #f59e0b;
    --accent-soft: #e0f2fe;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --shadow: 0 24px 58px rgba(30, 64, 175, 0.16);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.07);
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.055), 0 14px 34px rgba(30, 64, 175, 0.075);
    --shadow-focus: 0 0 0 0.22rem rgba(37, 99, 235, 0.16);
    --radius: 8px;
    --font-body: "Fira Sans", "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Segoe UI", sans-serif;
    --font-mono: "Fira Code", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: var(--font-body);
    letter-spacing: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.12), transparent 26%),
        radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.13), transparent 25%),
        linear-gradient(180deg, #f8fbff 0%, #edf5ff 46%, #f7fbff 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(37, 99, 235, 0.042) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 86%);
    opacity: 0.62;
}

a {
    color: var(--primary-2);
    text-decoration-color: rgba(37, 99, 235, 0.32);
}

a:hover {
    color: var(--accent);
}

.app-body {
    display: block;
}

.app-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: calc(100vh - 44px);
}

.mobile-shell-toggle {
    display: none;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 22px 16px 18px;
    color: #eaf3ff;
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(14, 165, 233, 0) 44%),
        linear-gradient(155deg, #081a44 0%, #0e327a 58%, #102964 100%);
    box-shadow: inset -1px 0 rgba(255, 255, 255, 0.1), 18px 0 42px rgba(15, 23, 42, 0.14);
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 78%);
}

.brand-mark {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark:hover {
    color: inherit;
    text-decoration: none;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(125, 211, 252, 0.92), rgba(37, 99, 235, 0.95)),
        #2563eb;
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.22);
}

.brand-title,
.brand-subtitle {
    display: block;
    line-height: 1.2;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: inherit;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 0.76rem;
    color: rgba(226, 240, 255, 0.72);
}

.side-nav {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 7px;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: rgba(226, 240, 255, 0.78);
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.side-nav-link i {
    width: 22px;
    text-align: center;
    color: #93c5fd;
    font-size: 1.05rem;
}

.side-nav-link:hover,
.side-nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(147, 197, 253, 0.25);
    transform: translateX(2px);
}

.side-nav-link:hover i,
.side-nav-link.active i {
    color: #ffffff;
}

.side-nav-link.active {
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.34), rgba(255, 255, 255, 0.1)),
        rgba(255, 255, 255, 0.08);
    box-shadow: inset 3px 0 0 #38bdf8, 0 10px 24px rgba(15, 23, 42, 0.14);
}

.sidebar-status {
    position: relative;
    z-index: 1;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border-radius: var(--radius);
    color: rgba(226, 240, 255, 0.82);
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.86rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
}

.app-frame {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 28px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.13);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.055), rgba(255, 255, 255, 0)),
        rgba(248, 251, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.topbar-kicker {
    color: var(--primary-2);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-title {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.18rem, 1.8vw, 1.65rem);
    font-weight: 800;
    line-height: 1.15;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.055);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.user-chip:hover,
.user-chip:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.badge-role {
    color: #713f12;
    background: #fef3c7;
}

.app-content {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 28px;
}

.public-body {
    background:
        radial-gradient(circle at 15% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
        radial-gradient(circle at 92% 4%, rgba(6, 182, 212, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 48%, #ffffff 100%);
}

.public-nav {
    min-height: 72px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.public-brand {
    color: var(--primary);
}

.public-brand .brand-icon {
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.18);
    background: linear-gradient(135deg, var(--primary-2), var(--accent));
    box-shadow: none;
}

.public-brand .brand-subtitle {
    color: var(--muted);
}

.public-nav .nav-link {
    color: var(--primary);
    font-weight: 700;
}

.public-nav .nav-link:hover {
    color: var(--accent);
}

.public-main {
    width: min(100%, 1180px);
    padding: 28px;
}

.app-footer {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: var(--muted);
    font-size: 0.86rem;
    background: rgba(255, 255, 255, 0.84);
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink);
    font-weight: 800;
    letter-spacing: 0;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 2px 0 0;
}

.page-eyebrow {
    margin-bottom: 6px;
    color: var(--primary-2);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-heading {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.5rem, 2.6vw, 2.15rem);
    line-height: 1.12;
}

.page-subtitle {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

.card,
.modal-content,
.alert,
.table-responsive,
.nav-tabs,
.list-group-item {
    border-color: var(--line);
}

.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(251, 253, 255, 0.96), rgba(255, 255, 255, 0.99)),
        var(--surface);
    box-shadow: var(--shadow-card);
}

.card:hover {
    transform: none;
}

.card-header {
    position: relative;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.09), rgba(14, 165, 233, 0.035) 64%, rgba(255, 255, 255, 0)),
        var(--surface-raised);
}

.card-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-2), var(--accent));
}

.card-header h5,
.card-header h6 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    line-height: 1.25;
}

.card-header h5 i,
.card-header h6 i {
    color: var(--primary-2);
}

.card-body {
    padding: 18px;
}

.shadow,
.shadow-sm {
    box-shadow: var(--shadow-soft) !important;
}

.btn {
    min-height: 38px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: none !important;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:focus-visible,
.side-nav-link:focus-visible,
.nav-tabs .nav-link:focus-visible,
.mobile-shell-toggle:focus-visible,
.user-chip:focus-visible {
    outline: 0;
    box-shadow: var(--shadow-focus) !important;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    min-height: 32px;
}

.btn-lg {
    min-height: 46px;
}

.btn-primary,
.bg-primary {
    border-color: var(--primary-2) !important;
    background: linear-gradient(135deg, var(--primary-2), var(--primary)) !important;
}

.btn-primary:hover {
    border-color: var(--primary-3) !important;
    background: linear-gradient(135deg, #3b82f6, var(--primary-3)) !important;
}

.btn-success,
.bg-success {
    border-color: var(--success) !important;
    background-color: var(--success) !important;
}

.btn-danger,
.bg-danger {
    border-color: var(--danger) !important;
    background-color: var(--danger) !important;
}

.btn-warning,
.bg-warning {
    border-color: var(--warning) !important;
    background-color: var(--warning) !important;
}

.btn-info,
.bg-info {
    border-color: var(--info) !important;
    background-color: var(--info) !important;
}

.btn-secondary,
.bg-secondary {
    border-color: #64748b !important;
    background-color: #64748b !important;
}

.btn-outline-primary {
    color: var(--primary-2);
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(255, 255, 255, 0.78);
}

.btn-outline-primary:hover {
    color: #fff;
    border-color: var(--primary-2);
    background: var(--primary-2);
}

.btn-outline-secondary {
    color: var(--ink);
    border-color: var(--line);
    background: var(--surface);
}

.btn-outline-secondary:hover {
    color: var(--primary-2);
    border-color: var(--accent);
    background: var(--accent-soft);
}

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

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

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

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

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

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

.badge {
    padding: 0.46em 0.7em;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0;
}

.form-label {
    color: var(--ink);
    font-weight: 800;
}

.form-text {
    color: var(--muted);
    font-size: 0.85rem;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 40px;
    border-color: var(--line);
    border-radius: 6px;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-2);
    box-shadow: var(--shadow-focus);
}

.input-group-text {
    color: var(--primary-2);
    background: #eff6ff;
}

.input-group .form-control,
.input-group .input-group-text {
    border-radius: 6px;
}

.nav-tabs {
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
        var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nav-tabs .nav-link {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 800;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-tabs .nav-link:hover {
    border-color: var(--line);
    color: var(--primary);
    background: #f1f7ff;
}

.nav-tabs .nav-link.active {
    color: #ffffff;
    border-color: var(--primary-2);
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.table-responsive {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(30, 64, 175, 0.06);
}

.table {
    margin-bottom: 0;
    color: var(--ink);
    background-color: var(--surface);
    vertical-align: middle;
}

.table thead th {
    padding: 12px;
    color: #1e3a8a;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(180deg, #f1f7ff, #eaf3ff);
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.table tbody td {
    padding: 11px 12px;
    border-color: #edf4ff;
}

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

.table-hover > tbody > tr:hover > * {
    background-color: rgba(37, 99, 235, 0.055);
}

.table .btn-group-sm > .btn,
.table .btn-sm {
    min-height: 30px;
}

.progress {
    height: 20px;
    border-radius: 999px;
    background: #e5efff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.progress-bar {
    border-radius: 999px;
    font-weight: 800;
}

.pagination {
    margin-top: 18px;
}

.pagination .page-link {
    color: var(--primary-2);
    border-color: var(--line);
}

.pagination .page-item.active .page-link {
    color: #fff;
    border-color: var(--primary-2);
    background-color: var(--primary-2);
}

.alert {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.alert-info {
    color: #075985;
    background: #e0f2fe;
}

.alert-success {
    color: #065f46;
    background: #dff7ed;
}

.alert-warning {
    color: #78350f;
    background: #fef3c7;
}

.alert-danger {
    color: #7f1d1d;
    background: #fee2e2;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 28px;
    align-items: stretch;
    padding: clamp(26px, 5vw, 54px);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.92) 54%, rgba(2, 132, 199, 0.86)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: auto, 28px 28px, 28px 28px;
    box-shadow: var(--shadow);
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: clamp(18px, 5vw, 62px);
    top: clamp(18px, 5vw, 54px);
    width: 168px;
    height: 168px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.22) 49%, rgba(255, 255, 255, 0.22) 51%, transparent 52%),
        linear-gradient(transparent 48%, rgba(255, 255, 255, 0.22) 49%, rgba(255, 255, 255, 0.22) 51%, transparent 52%);
    opacity: 0.35;
}

.hero-panel h1,
.hero-panel h2,
.hero-panel p {
    color: inherit;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-title {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.02;
}

.hero-copy {
    max-width: 680px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 1.06rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.evidence-board {
    display: grid;
    align-content: space-between;
    gap: 14px;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.evidence-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px;
    border-radius: 7px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.evidence-item i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #1d4ed8;
    background: #dbeafe;
}

.evidence-label {
    display: block;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.75rem;
}

.evidence-value {
    display: block;
    font-weight: 800;
}

.feature-tile,
.metric-card,
.workflow-card {
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(251, 253, 255, 0.96), rgba(255, 255, 255, 0.99)),
        var(--surface);
    box-shadow: var(--shadow-card);
}

.feature-tile {
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.feature-tile::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-2), var(--accent));
}

.feature-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: var(--radius);
    color: var(--primary-2);
    background: #dbeafe;
    font-size: 1.3rem;
}

.detection-visual {
    display: grid;
    gap: 14px;
}

.detection-verdict {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(135deg, var(--primary-3), var(--primary-2));
    background-size: 24px 24px, 24px 24px, auto;
    box-shadow: 0 16px 34px rgba(30, 64, 175, 0.22);
}

.detection-verdict::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 18px;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.26) 49%, rgba(255, 255, 255, 0.26) 51%, transparent 52%),
        linear-gradient(transparent 48%, rgba(255, 255, 255, 0.26) 49%, rgba(255, 255, 255, 0.26) 51%, transparent 52%);
    opacity: 0.38;
}

.detection-verdict h3 {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: clamp(1.45rem, 4vw, 2.35rem);
}

.detection-verdict-danger {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #7f1d1d, var(--danger));
    background-size: 24px 24px, 24px 24px, auto;
}

.detection-verdict-success {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #064e3b, var(--success));
    background-size: 24px 24px, 24px 24px, auto;
}

.detection-kicker {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.detection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.detection-gauge,
.detection-meta {
    position: relative;
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.detection-gauge::before,
.detection-meta::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-2), rgba(14, 165, 233, 0.45));
}

.detection-gauge .detection-kicker,
.detection-meta .detection-kicker {
    color: var(--muted);
}

.detection-gauge strong,
.detection-meta strong {
    display: block;
    margin-top: 10px;
    color: var(--primary-3);
    font-family: var(--font-mono);
    font-size: 1.22rem;
}

.detection-gauge .progress {
    height: 12px;
    margin-top: 14px;
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.4fr);
    gap: 16px;
    align-items: center;
}

.feature-bar {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}

.feature-bar .progress {
    height: 8px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 450px);
    gap: 28px;
    align-items: center;
    min-height: calc(100vh - 190px);
}

.auth-visual {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: min(620px, calc(100vh - 190px));
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.92) 54%, rgba(2, 132, 199, 0.84)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: auto, 30px 30px, 30px 30px;
    box-shadow: var(--shadow);
}

.auth-visual h1 {
    max-width: 680px;
    color: #ffffff;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.12;
}

.auth-visual p {
    max-width: 610px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.04rem;
}

.auth-visual .evidence-board {
    align-content: start;
    min-height: auto;
}

.auth-card {
    align-self: center;
}

.upload-workspace .nav-tabs {
    margin-bottom: 16px !important;
}

.upload-panel {
    position: relative;
    overflow: hidden;
    border-color: var(--line-strong);
}

.upload-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-2), var(--accent), var(--accent-2));
}

.upload-panel .card-body {
    padding: 24px;
}

.upload-panel textarea,
.upload-panel input[type="file"] {
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
        #fbfdff;
    background-size: 18px 18px;
}

.upload-panel textarea {
    min-height: 260px;
    resize: vertical;
}

.upload-panel input[type="file"] {
    min-height: 48px;
    padding: 11px;
    border-style: dashed;
    border-color: rgba(37, 99, 235, 0.34);
}

.upload-panel .btn + .btn {
    margin-left: 8px;
}

.selectedFiles,
#selectedFilesList {
    max-height: 300px;
    overflow-y: auto;
    border-radius: var(--radius);
}

.guidance-card {
    position: sticky;
    top: 96px;
}

.guidance-card .card-header {
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0)),
        #fbfdff;
}

.guidance-card ul {
    padding-left: 1.1rem;
}

.guidance-card li {
    margin-bottom: 8px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-2), var(--accent));
}

.metric-card:hover {
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.055), 0 18px 38px rgba(30, 64, 175, 0.11);
    transform: translateY(-2px);
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--primary-2);
    background:
        linear-gradient(135deg, #dbeafe, #eef6ff);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.metric-value {
    margin: 13px 0 2px;
    color: var(--primary-3);
    font-family: var(--font-mono);
    font-size: clamp(2rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

.metric-label {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.filter-card,
.action-toolbar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94)),
        var(--surface);
    box-shadow: var(--shadow-card);
}

.filter-card .card-body,
.action-toolbar {
    padding: 14px;
}

.action-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.file-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.file-cell i {
    color: var(--primary-2);
    font-size: 1.1rem;
}

.file-name {
    font-weight: 800;
}

.risk-meter {
    min-width: 124px;
}

.risk-meter .progress {
    height: 8px;
    margin-top: 5px;
}

canvas {
    max-height: 300px;
}

.card canvas {
    display: block;
    width: 100% !important;
}

kbd {
    color: var(--primary-3);
    background: #eaf3ff;
    border: 1px solid var(--line);
    box-shadow: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    min-width: 720px;
}

.modal-content {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.modal-header {
    border-bottom-color: var(--line);
    background: #eff6ff;
}

.modal-footer {
    border-top-color: var(--line);
}

.spinner-border {
    width: 2.4rem;
    height: 2.4rem;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-shell {
        grid-template-columns: 236px minmax(0, 1fr);
    }

    .app-sidebar {
        padding: 20px 14px;
    }

    .brand-title {
        font-size: 0.94rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .side-nav-link {
        gap: 10px;
        padding: 0 10px;
        font-size: 0.93rem;
    }

    .app-content {
        padding: 24px;
    }

    .detection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .mobile-shell-toggle {
        position: sticky;
        top: 0;
        z-index: 40;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        margin: 10px 14px 0;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--primary);
        background:
            linear-gradient(90deg, rgba(37, 99, 235, 0.07), rgba(255, 255, 255, 0)),
            rgba(255, 255, 255, 0.94);
        box-shadow: var(--shadow-soft);
        font-weight: 800;
    }

    .app-sidebar {
        position: static;
        height: auto;
        margin: 10px 14px 0;
        padding: 14px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .shell-nav-collapsed .app-sidebar {
        display: none !important;
        visibility: hidden;
    }

    .shell-nav-collapsed .app-sidebar * {
        display: none !important;
    }

    .side-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brand-mark {
        width: 100%;
    }

    .sidebar-status {
        display: none;
    }

    .app-topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
        margin: 12px 14px 0;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
    }

    .topbar-actions {
        width: 100%;
    }

    .app-content,
    .public-main {
        padding: 18px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-panel::after {
        width: 120px;
        height: 120px;
    }

    .detection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-row {
        grid-template-columns: 1fr;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-visual {
        min-height: auto;
    }

    .guidance-card {
        position: static;
    }

    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 8px;
    }

    .nav-tabs .nav-item {
        flex: 0 0 auto;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    body::before {
        opacity: 0.28;
    }

    .mobile-shell-toggle {
        margin: 8px 10px 0;
        width: calc(100% - 20px);
    }

    .app-sidebar {
        margin: 8px 10px 0;
    }

    .app-topbar {
        margin: 10px 10px 0;
        padding: 14px;
    }

    .topbar-title {
        font-size: 1.18rem;
    }

    .topbar-actions,
    .hero-actions,
    .page-head,
    .action-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .topbar-actions > *,
    .hero-actions > *,
    .action-toolbar .btn-group,
    .action-toolbar .btn {
        width: 100%;
    }

    .user-chip,
    .topbar-actions > .btn {
        justify-content: center;
    }

    .side-nav {
        grid-template-columns: 1fr;
    }

    .side-nav-link {
        justify-content: flex-start;
        min-height: 42px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .app-content,
    .public-main {
        padding: 14px 10px 18px;
    }

    .page-heading {
        font-size: 1.42rem;
    }

    .page-subtitle {
        font-size: 0.94rem;
    }

    .card-body {
        padding: 16px;
    }

    .upload-panel .card-body {
        padding: 18px;
    }

    .upload-panel textarea {
        min-height: 220px;
    }

    .upload-panel .btn + .btn {
        margin-top: 8px;
        margin-left: 0;
    }

    .nav-tabs {
        margin-left: -4px;
        margin-right: -4px;
    }

    .upload-workspace {
        --bs-gutter-x: 0;
    }

    .hero-panel {
        min-height: auto;
        padding: 20px;
    }

    .hero-title {
        font-size: 1.95rem;
    }

    .detection-grid {
        grid-template-columns: 1fr;
    }

    .detection-verdict {
        align-items: flex-start;
        flex-direction: column;
    }

    .feature-row {
        gap: 10px;
    }

    .metric-value {
        font-size: 2rem;
    }

    .auth-visual {
        padding: 24px 18px;
    }

    .auth-visual h1 {
        font-size: 2rem;
    }

    .table {
        min-width: 680px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .app-footer {
        text-align: center;
    }
}
