﻿:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --brand: #1f6feb;
    --brand-dark: #0f4db8;
    --text: #0f172a;
    --muted: #64748b;
    --danger: #dc2626;
    --success: #15803d;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 45%, #f3f6fb 100%);
}

a {
    color: var(--brand);
    text-decoration: none;
}

.container {
    width: min(1100px, 94%);
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid #dbe4f2;
}

.topbar-inner {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 30px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a {
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.nav a:hover {
    background: #e9f1ff;
}

.main {
    padding: 20px 0 36px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 14px;
}

.grid {
    display: grid;
    gap: 14px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metrics .value {
    font-size: 24px;
    font-weight: 700;
    margin: 2px 0;
}

.muted {
    color: var(--muted);
}

.search-bar {
    position: sticky;
    top: 64px;
    z-index: 15;
    background: rgba(243, 246, 251, 0.94);
    padding: 10px 0;
}

input,
select,
textarea,
button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d6deea;
    font-size: 15px;
    background: #fff;
}

button,
.btn {
    cursor: pointer;
    border: none;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    padding: 10px 14px;
    width: auto;
}

.btn.alt {
    background: #0f172a;
}

.btn.gray {
    background: #64748b;
}

.btn.warn {
    background: var(--danger);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-wrap {
    overflow: auto;
}

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

th,
td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5ebf5;
    font-size: 14px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.tag.ok { background: #dcfce7; color: var(--success); }
.tag.low { background: #fee2e2; color: var(--danger); }
.tag.mid { background: #fff3c7; color: #b45309; }

.auth-wrap {
    max-width: 420px;
    margin: 64px auto;
}

.messages {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.msg {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
}

.msg.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

@media (max-width: 720px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 8px 0;
    }
    .search-bar {
        top: 94px;
    }
}
