/* 时光邮局主控台后台样式 */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f3f5f9; color: #26303f; font-size: 14px; }
a { color: #3b6fd4; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #2b4a8b 0%, #3b6fd4 100%); }
.login-card { width: 380px; background: #fff; padding: 40px 36px; border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.18); }
.login-brand { text-align: center; font-size: 19px; font-weight: 700; margin-bottom: 26px; color: #2b4a8b; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.login-card input { width: 100%; padding: 11px 12px; border: 1px solid #d8dee9; border-radius: 8px; font-size: 14px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #1f2d4d; color: #c6d0e6; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { padding: 22px 20px; font-size: 17px; font-weight: 700; color: #fff; line-height: 1.4; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand span { font-size: 12px; font-weight: 400; color: #8fa3cc; }
.sidebar nav { flex: 1; padding: 12px 0; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #c6d0e6; font-size: 14px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { background: #3b6fd4; color: #fff; }
.sidebar nav .ic { width: 18px; text-align: center; }
.side-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-foot a { color: #8fa3cc; font-size: 12px; }

.main { flex: 1; padding: 0 26px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.topbar h1 { font-size: 20px; margin: 0; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.card-stat { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(16,42,86,.08); }
.card-stat .num { font-size: 28px; font-weight: 700; color: #1f2d4d; }
.card-stat .lbl { color: #5d6b85; margin: 6px 0 4px; }
.card-stat .sub { font-size: 12px; color: #98a2b3; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.panel { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(16,42,86,.08); }
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-h h2 { font-size: 15px; margin: 0; }
.more { font-size: 13px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.table th { font-size: 12px; color: #7a8699; font-weight: 600; background: #fafbfd; }
.table tr:hover td { background: #fafbfd; }
.table .empty { text-align: center; color: #98a2b3; padding: 30px; }
.small { font-size: 12px; color: #7a8699; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12px; word-break: break-all; }
.text-danger { color: #d92d20; }
.text-warning { color: #dc6803; }
.text-muted { color: #98a2b3; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.badge-success { background: #e8f7ee; color: #1e7d43; }
.badge-warning { background: #fdf3e0; color: #b25e09; }
.badge-danger { background: #fdecea; color: #b42318; }
.badge-secondary { background: #eef1f6; color: #5d6b85; }

/* 表单 */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1px solid #d8dee9; border-radius: 8px; font-size: 13px; }
.toolbar input { flex: 1; min-width: 200px; }
.form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.form input[type=text], .form input[type=password], .form input[type=number], .form input[type=datetime-local], .form select, .form textarea {
    width: 100%; padding: 9px 12px; border: 1px solid #d8dee9; border-radius: 8px; font-size: 13px; font-family: inherit; }
.form textarea { resize: vertical; }
.form .check { font-weight: 400; display: flex; align-items: center; gap: 6px; }
.form .check input { width: auto; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; }
.kv > div { display: contents; }
.kv span { color: #7a8699; font-size: 13px; }
.kv b { font-weight: 600; word-break: break-all; }

.btn { display: inline-block; padding: 9px 20px; border: 0; border-radius: 8px; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-primary { background: #3b6fd4; color: #fff; }
.btn-primary:hover { background: #3260bd; }
.btn-secondary { background: #eef1f6; color: #3d4a63; }
.btn-danger { background: #d92d20; color: #fff; }
.btn-success { background: #12a150; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-link { background: none; border: 0; color: #3b6fd4; padding: 0; cursor: pointer; font-size: 12px; margin-right: 8px; }
.tips { margin: 0; padding-left: 18px; line-height: 1.9; color: #5d6b85; font-size: 13px; }
.tips code { font-size: 11px; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs a { padding: 8px 18px; background: #fff; border-radius: 8px; font-size: 13px; color: #5d6b85; }
.tabs a.active { background: #3b6fd4; color: #fff; }

.pager { margin-top: 14px; display: flex; gap: 6px; justify-content: center; }
.pager a, .pager .cur { padding: 5px 11px; border-radius: 6px; font-size: 13px; background: #fff; }
.pager .cur { background: #3b6fd4; color: #fff; }

.alert { padding: 11px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; transition: opacity .4s; }
.alert-success { background: #e8f7ee; color: #1e7d43; }
.alert-danger { background: #fdecea; color: #b42318; }

@media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
