*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu}

/* 左侧导航布局 */
.layout{display:flex;min-height:100vh;background:#f7f8fa}
.sidebar{width:240px;background:#1f1f1f;color:#fff;padding:18px 14px;position:sticky;top:0;height:100vh;border-right:1px solid #0f0f0f}
.sidebar .brand{font-weight:700;letter-spacing:.5px;margin-bottom:14px}
.sidebar nav{display:flex;flex-direction:column;gap:8px}
.sidebar nav a{color:#d9d9d9;text-decoration:none;padding:10px 12px;border-radius:8px;transition:all .15s ease}
.sidebar nav a:hover{background:#2a2a2a;color:#fff}
.sidebar nav a.active{background:#1677ff;color:#fff}
.content{flex:1;padding:20px}

/* 卡片与表格 */
.card{background:#fff;border:1px solid #eee;border-radius:10px;padding:16px;margin-bottom:16px;box-shadow:0 4px 12px rgba(0,0,0,.04)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}
.table th,.table td{border:1px solid #eee;padding:10px;text-align:left}
.table th{background:#fafafa}

/* 表单与按钮 */
.form-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
input[type=text],input[type=password],input[type=file],select{padding:10px;border:1px solid #ccc;border-radius:6px;width:300px;max-width:100%;background:#fff}
button{padding:10px 14px;border:0;border-radius:6px;background:#1677ff;color:#fff;cursor:pointer;transition:opacity .15s}
button:hover{opacity:.9}
button.secondary{background:#666}
.notice{padding:10px;border-radius:8px;background:#f6ffed;border:1px solid #b7eb8f;color:#389e0d;margin-bottom:12px}
.error{background:#fff2f0;border:1px solid #ffccc7;color:#cf1322}

/* 响应式移动端 */
@media (max-width:640px){
  .layout{display:block}
  .sidebar{width:100%;height:auto;position:relative;display:flex;align-items:center;gap:10px}
  .sidebar nav{flex-direction:row;flex-wrap:wrap;gap:8px}
  .content{padding:14px}
}