* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
code, pre { font-family: Consolas, Monaco, monospace; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.login-card h1 { margin: 0 0 8px; font-size: 24px; }
.login-subtitle { margin: 0 0 24px; color: #6b7280; }

.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px;
    background: #111827;
    color: #fff;
    padding: 24px 16px;
}
.brand { font-weight: 700; margin-bottom: 24px; line-height: 1.4; }
.nav-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d1d5db;
    margin-bottom: 6px;
}
.nav-item:hover, .nav-item.active { background: #1f2937; color: #fff; }
.main { flex: 1; padding: 28px; }
.main h1 { margin: 0 0 20px; font-size: 28px; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-label { color: #6b7280; font-size: 13px; margin-bottom: 8px; }
.card-value { font-size: 28px; font-weight: 700; }
.card-value.success { color: #059669; }
.card-value.warning { color: #d97706; }
.card-value.danger { color: #dc2626; }

.panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.panel h2 { margin: 0 0 16px; font-size: 18px; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th, .table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}
.table th { background: #f9fafb; color: #4b5563; }
.empty { text-align: center; color: #9ca3af; }

.form label { display: block; margin: 12px 0 6px; font-size: 14px; }
.form input[type="text"], .form input[type="password"], .filters input, .filters select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}
.checkbox { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.btn, .filters button {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #e5e7eb;
    cursor: pointer;
}
.btn-primary, .filters button { background: #2563eb; color: #fff; }
.filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-width: 180px; }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    margin-bottom: 16px;
}
.alert-error { background: #fef2f2; color: #b91c1c; }

.pagination { margin-top: 16px; display: flex; gap: 12px; align-items: center; }
.tabs { margin-bottom: 16px; display: flex; gap: 8px; }
.tabs a {
    padding: 8px 14px;
    border-radius: 8px;
    background: #e5e7eb;
    color: #374151;
}
.tabs a.active { background: #2563eb; color: #fff; }
.code-snippet {
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    font-size: 12px;
    color: #374151;
}
.steps { line-height: 1.8; }

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}
