body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b 45%, #334155);
    color: #0f172a;
}

* { box-sizing: border-box; }

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

.card {
    background: rgba(255,255,255,0.96);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.login-wrap {
    max-width: 420px;
    margin: 72px auto;
}

.login-header,
.page-header {
    padding: 28px 32px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb, #38bdf8);
    color: #fff;
}

.login-body,
.page-body {
    padding: 28px 32px 36px;
}

h1,h2,h3,p { margin-top: 0; }

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: .2s ease;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-muted { background: #e2e8f0; color: #0f172a; }
.btn-muted:hover { background: #cbd5e1; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.topbar h1 { margin: 0; color: #fff; }
.topbar p { margin: 6px 0 0; color: rgba(255,255,255,0.85); }

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

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 18px;
}

.stat-box .label { color: #475569; font-size: 13px; margin-bottom: 10px; }
.stat-box .value { font-size: 28px; font-weight: 800; color: #1d4ed8; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}

.table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
}

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

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.muted { color: #64748b; }

.code-box {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 14px;
    overflow: auto;
    font-size: 13px;
}

@media (max-width: 860px) {
    .app-shell { padding: 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .login-header, .page-header, .login-body, .page-body { padding: 22px; }
}
