:root {
  --bg: #f5f4f0;
  --sidebar-bg: #1a1a2e;
  --sidebar-text: #a8a8c0;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #888898;
  --border: #e8e8e4;
  --accent: #4f6ef7;
  --accent-light: #eef0fe;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --font: 'Noto Sans TC', sans-serif;
  --mono: 'DM Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); display: flex; min-height: 100vh; font-size: 14px; }

/* Sidebar */
.sidebar { width: 220px; min-height: 100vh; background: var(--sidebar-bg); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 10; }
.sidebar-logo { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-logo .logo-text { font-size: 15px; font-weight: 700; color: #fff; }
.sidebar-logo .logo-sub { font-size: 11px; color: var(--sidebar-text); margin-top: 2px; font-family: var(--mono); }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 10px; font-weight: 500; color: rgba(168,168,192,0.5); letter-spacing: 0.1em; text-transform: uppercase; padding: 12px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--sidebar-text); cursor: pointer; transition: all 0.15s; font-size: 13.5px; font-weight: 400; border: none; background: none; width: 100%; text-align: left; text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(79,110,247,0.18); color: #fff; font-weight: 500; }
.nav-item .icon { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-name { font-size: 13px; color: #fff; font-weight: 500; }
.user-role { font-size: 11px; color: var(--sidebar-text); }

/* Layout */
.main { margin-left: 220px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: var(--card-bg); border-bottom: 1px solid var(--border); padding: 0 32px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; }
.topbar-title { font-size: 16px; font-weight: 700; }
.api-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--mono); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #ccc; transition: background 0.3s; }
.status-dot.ok { background: var(--green); }
.status-dot.err { background: var(--red); }
.status-label { color: var(--text-muted); }
.content { padding: 28px 32px; flex: 1; }

/* Page header */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 700; }
.page-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Card */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 14px; font-weight: 600; }
.card-action { font-size: 12px; color: var(--accent); cursor: pointer; }
.card-body { padding: 0; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); border-radius: 12px 12px 0 0; }
.stat-card.green::before { background: var(--green); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.red::before { background: var(--red); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-unit { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 20px; font-size: 11px; font-weight: 500; color: var(--text-muted); background: #fafaf8; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.05em; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafaf8; }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Button */
.btn { padding: 9px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s; font-family: var(--font); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d5ce6; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.form-input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: var(--font); background: var(--card-bg); color: var(--text); outline: none; transition: border-color 0.15s; }
.form-input:focus { border-color: var(--accent); }

/* Notification */
.notif-item { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.notif-dot.read { background: var(--border); }
.notif-title { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--text-muted); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; font-family: var(--mono); }

/* Progress */
.progress-wrap { background: var(--border); border-radius: 99px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.6s ease; }
.progress-bar.green { background: var(--green); }
.progress-bar.amber { background: var(--amber); }
.progress-bar.red { background: var(--red); }

/* Job card */
.job-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.job-title { font-size: 15px; font-weight: 600; }
.job-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.job-meta-item { font-size: 12px; color: var(--text-muted); }

/* Event card */
.event-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.event-header { background: var(--accent); padding: 12px 16px; }
.event-date { font-size: 11px; color: rgba(255,255,255,0.7); font-family: var(--mono); }
.event-name { font-size: 15px; font-weight: 600; color: #fff; margin-top: 2px; }
.event-body { padding: 14px 16px; }
.event-detail { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.event-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.event-spots { font-size: 12px; color: var(--text-muted); }

/* Misc */
.mono { font-family: var(--mono); }
.empty { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.mock-notice { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 8px; padding: 8px 14px; font-size: 12px; color: #92400e; margin-bottom: 16px; display: none; }
.mock-notice.show { display: block; }
.skeleton { background: linear-gradient(90deg,#f0f0ec 25%,#e8e8e4 50%,#f0f0ec 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
