* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; font-family: Arial, "Microsoft YaHei", sans-serif; color: #172033; background: #f3f6fb; }
a { color: #2457d6; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; background: #121a2c; color: #fff; z-index: 1001; overflow-y: auto; }
.sidebar-brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand strong { display: block; font-size: 22px; }
.sidebar-brand span { display: block; margin-top: 6px; color: #94a3b8; font-size: 12px; letter-spacing: 2px; }
.sidebar-menu a { display: block; padding: 14px 20px; color: #cbd5e1; border-left: 3px solid transparent; }
.sidebar-menu a:hover, .sidebar-menu a.active { color: #fff; background: #1d2942; border-left-color: #3b82f6; }
.menu-icon { display: inline-block; width: 26px; }
.admin-main { margin-left: 250px; min-height: 100vh; }
.admin-topbar { min-height: 76px; padding: 14px 24px; background: #fff; border-bottom: 1px solid #e5eaf1; display: table; width: 100%; }
.drawer-toggle { display: none; }
.topbar-title, .topbar-user { display: table-cell; vertical-align: middle; }
.topbar-title strong { display: block; font-size: 20px; }
.topbar-title span { display: block; margin-top: 4px; color: #667085; }
.topbar-user { text-align: right; white-space: nowrap; }
.topbar-user a { margin-left: 14px; }
.admin-content { padding: 24px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { margin: 0 0 8px; font-size: 30px; }
.page-head p { margin: 0; color: #667085; line-height: 1.7; }
.stats-grid { display: table; width: 100%; table-layout: fixed; border-spacing: 14px 0; margin: 0 -14px 22px; }
.stat-card { display: table-cell; background: #fff; border: 1px solid #e1e7ef; border-radius: 14px; padding: 22px; }
.stat-card span { display: block; color: #667085; }
.stat-card strong { display: block; margin-top: 10px; font-size: 34px; }
.panel { background: #fff; border: 1px solid #e1e7ef; border-radius: 14px; padding: 20px; margin-bottom: 22px; }
.panel-title { font-size: 20px; font-weight: bold; margin-bottom: 18px; }
.split-grid { display: table; width: 100%; table-layout: fixed; border-spacing: 12px 0; margin: 0 -12px; }
.split-grid > .panel { display: table-cell; width: 50%; vertical-align: top; }
label { display: block; margin: 13px 0 6px; font-weight: bold; }
input[type=text], input[type=password], select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cfd8e5; border-radius: 8px; background: #fff; }
textarea { resize: vertical; }
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 16px; background: #e9eef7; color: #172033; cursor: pointer; margin-top: 14px; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-success { background: #0f9d68; color: #fff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-small { padding: 6px 10px; margin-top: 0; font-size: 13px; }
.btn-block { width: 100%; }
.inline-form { display: inline; }
.inline-form .btn { margin-top: 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid #e8edf4; text-align: left; vertical-align: top; }
.data-table th { color: #475467; background: #f8fafc; }
.table-wrap { overflow-x: auto; }
.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; }
.notice-success { background: #eaf8f1; color: #087443; }
.notice-error { background: #fff0f0; color: #b42318; }
.action-row { display: inline-block; margin-right: 8px; }
.login-page { display: table; width: 100%; min-height: 100vh; }
.login-card { width: 390px; max-width: calc(100% - 32px); margin: 8vh auto 0; background: #fff; border: 1px solid #dfe6ef; border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(21,31,50,.08); }
.login-card h1 { margin: 0; font-size: 26px; }
.login-card p { color: #667085; line-height: 1.6; }
.drawer-mask { display: none; }

@media screen and (max-width: 900px) {
    .admin-sidebar { left: -260px; transition: left .22s ease; }
    body.drawer-open .admin-sidebar { left: 0; }
    .admin-main { margin-left: 0; }
    .drawer-mask { display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: #000; opacity: .42; z-index: 1000; }
    body.drawer-open .drawer-mask { display: block; }
    .drawer-toggle { display: inline-block; float: left; margin: 6px 14px 0 0; width: 42px; height: 42px; border: 0; border-radius: 8px; background: #eef2f8; font-size: 24px; }
    .admin-topbar { display: block; min-height: 0; overflow: hidden; }
    .topbar-title, .topbar-user { display: block; text-align: left; }
    .topbar-user { clear: both; padding-top: 12px; margin-top: 12px; border-top: 1px solid #e5eaf1; }
    .admin-content { padding: 16px; }
    .stats-grid, .split-grid { display: block; margin: 0; }
    .stat-card, .split-grid > .panel { display: block; width: 100%; margin-bottom: 14px; }
    .page-head h1 { font-size: 26px; }
}
