/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
       background: #f5f7fa; color: #333; line-height: 1.6; }
a { color: #2563a8; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 24px auto; padding: 0 20px; }

/* ---------- 导航 ---------- */
.navbar { background: #2c3e50; color: #fff; padding: 0 20px; display: flex; align-items: center;
          justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; }
.navbar .brand { font-size: 18px; font-weight: 600; color: #fff; }
.navbar .nav-links { display: flex; gap: 4px; align-items: center; }
.navbar a { color: #ecf0f1; padding: 6px 12px; border-radius: 4px; }
.navbar a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.navbar a.active { background: rgba(255,255,255,.2); }
.navbar .user-area { display: flex; gap: 10px; align-items: center; font-size: 13px; }

/* ---------- 卡片 / 表格 ---------- */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { font-size: 16px; margin-bottom: 14px; color: #2c3e50; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid #eceff3; text-align: left;
                               vertical-align: top; }
table.list th { background: #f8fafc; color: #5a6a7a; font-weight: 600; white-space: nowrap; }
table.list tr:hover td { background: #f8fafc; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.tag-blue { background: #e3ecf7; color: #2563a8; }
.tag-green { background: #e6f6ec; color: #1e8e4f; }
.tag-red { background: #fdeaea; color: #c0392b; }
.tag-gray { background: #eef0f2; color: #6b7684; }
.tag-orange { background: #fdf3e3; color: #b9770e; }

/* ---------- 按钮 / 表单 ---------- */
.btn { display: inline-block; padding: 6px 14px; border: none; border-radius: 5px; cursor: pointer;
       font-size: 14px; background: #2563a8; color: #fff; }
.btn:hover { background: #1d4f88; text-decoration: none; }
.btn-sm { padding: 3px 10px; font-size: 13px; }
.btn-gray { background: #6b7684; }
.btn-gray:hover { background: #57626e; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #a33225; }
.btn-outline { background: #fff; color: #2563a8; border: 1px solid #2563a8; }
.btn-outline:hover { background: #eef4fb; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 5px; color: #445; font-weight: 600; }
.form-row .hint { font-size: 12px; color: #8a95a3; margin-top: 3px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number],
.form-row input[type=date], .form-row select, .form-row textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #d5dce4; border-radius: 5px; font-size: 14px;
    font-family: inherit; background: #fff; }
.form-row textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.alert { padding: 10px 14px; border-radius: 5px; margin-bottom: 14px; font-size: 14px; }
.alert-error { background: #fdeaea; color: #c0392b; border: 1px solid #f5c6c0; }
.alert-success { background: #e6f6ec; color: #1e8e4f; border: 1px solid #bfe8cf; }
.alert-info { background: #eef2ff; color: #0A0080; border: 1px solid #c3c9ff; }

/* ---------- 统计卡片 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .num { font-size: 28px; font-weight: 600; color: #2c3e50; }
.stat-card .label { font-size: 13px; color: #8a95a3; margin-top: 2px; }
.stat-card.red .num { color: #c0392b; }
.stat-card.green .num { color: #1e8e4f; }

/* ---------- 照片 ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.photo-grid a { display: block; border: 1px solid #e3e8ee; border-radius: 6px; overflow: hidden; }
.photo-grid img { width: 160px; height: 120px; object-fit: cover; display: block; }

/* ---------- 登录页 ---------- */
.login-wrap { max-width: 380px; margin: 90px auto; }
.login-card { background: #fff; border-radius: 10px; padding: 32px; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; color: #2c3e50; }
.login-card .sub { text-align: center; color: #8a95a3; font-size: 13px; margin-bottom: 22px; }

/* ---------- 其他 ---------- */
.pagination { margin-top: 14px; font-size: 14px; color: #6b7684; }
.pagination a { margin: 0 4px; }
.muted { color: #8a95a3; font-size: 13px; }
.desc-block { background: #f8fafc; border-left: 3px solid #2563a8; padding: 10px 14px; border-radius: 0 6px 6px 0;
              margin-bottom: 16px; font-size: 14px; white-space: pre-wrap; }
.desc-block b { color: #2c3e50; }
.inline-form { display: inline; }

/* 表格操作列：按钮横排不换行，紧凑间距 */
td.actions { white-space: nowrap; }
td.actions > * { margin-right: 6px; }
td.actions > *:last-child { margin-right: 0; }
td.actions .btn-sm { padding: 3px 8px; font-size: 12px; }
td.nowrap { white-space: nowrap; }
